Read only text filed within structure with random value

Hello,

How to pre-fill a text field in a structure with randomly generated value? Every time a user adds an item to a structure this field should be pre-filled with randomly generated value.

Can not find any hooks which would apply here.
Can this be done with Kirby?

Thank you in advance

With a default value you can prefill a field. Unfortunately, however, the default attribute doesn’t support the blueprint query language.

I think your only option here is to create a custom field that accepts a dynamic default value.

Because there is no hook that listens to when a structure item is created.

1 Like