Toggling editability on fields in a repeater
I've got a repeater with 2 fields in it.
While on the edit view I need the textarea disabled, and the checkbox hidden by default.
Then, I need a button to "unlock" those fields for editing. As in, show the checkbox and un-disable the textarea.
Yes, it sounds wacky, but it's what my client wants I'm afraid.
I tried using
While on the edit view I need the textarea disabled, and the checkbox hidden by default.
Then, I need a button to "unlock" those fields for editing. As in, show the checkbox and un-disable the textarea.
Yes, it sounds wacky, but it's what my client wants I'm afraid.
I tried using
live() on the toggle, and having both disabled() and hidden() use the value from a toggle outside the repeater to try and do what I wanted but that didn't seem to work.Solution
So, for others trying to do insanity like me: Remember that inside repeaters you gotta use
../../ if you wanna use $get - This is covered in the documentation here: https://filamentphp.com/docs/3.x/forms/fields/repeater#using-get-to-access-parent-field-values