Is it possible to dynamically set ->defaultItems to be the value from another field?
I am toying with this, but I am not even sure if it is valid.
->defaultItems(fn (Closure $get) => $get('../../number_of_documents') != null)
Where number_of_documents is a text input of type number outside the repeater5 Replies
default items are only used when the form is first loaded
you probably just want an afterStateUpdated() and $set() on the numer_of_documents input
Ok, that makes more sense. Trying something like this but I am missing the part that would set defaultItems...
->reactive()
->afterStateUpdated(function (Closure $set, $state) {
$set('documents', $state);
})
that will create an array of arrays
and each item needs a set of blank fields
ahh okay, I was thinking of something else... this works great. Thank you.
On a separate note, I started sponsoring yesterday in case you can set the discord role. I am hoping to be able to up that as my product gets traction. Thanks again.
Thanks, you have the role :)