FilamentF
Filamentβ€’3y ago
Sauravisus

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 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
Was this page helpful?