Execute an action on checkbox toggle
I would like to reset the password and password_confirmation fields when I check or uncheck the checkbox button, so the passwords start from a clean slate all the time.
I am not sure if it can be done via Livewire or Alpine somehow or there is an inbuilt functionality inside Filament.
My code:
Perhaps adding afterStateUpdated() to Checkbox::make() ? But how to target password and password_confirmation fields only? And make them clear up both when clicking on the checkbox (for both show and hide states)?
I am not sure if it can be done via Livewire or Alpine somehow or there is an inbuilt functionality inside Filament.
My code:
Perhaps adding afterStateUpdated() to Checkbox::make() ? But how to target password and password_confirmation fields only? And make them clear up both when clicking on the checkbox (for both show and hide states)?