How to add modal confirmation?

I am trying to add deactivated and activated user functionality with Toggle::make('is_activated'). Within this toggle, I am attempting to incorporate a modal confirmation when an admin deactivates a user account. How can I?
5 Replies
Rupadana
Rupadana14mo ago
Include it to the your Edit Resource class
protected function getSaveFormAction(): Action
{
return Action::make('save')
->label(__('filament-panels::resources/pages/edit-record.form.actions.save.label'))
->requiresConfirmation()
->action(fn () => $this->save())
->keyBindings(['mod+s']);
}
protected function getSaveFormAction(): Action
{
return Action::make('save')
->label(__('filament-panels::resources/pages/edit-record.form.actions.save.label'))
->requiresConfirmation()
->action(fn () => $this->save())
->keyBindings(['mod+s']);
}
Shaung Bhone
Shaung BhoneOP14mo ago
Thanks let me check
Rupadana
Rupadana14mo ago
so you use ToggleColumn or Toggle inside a form?
Shaung Bhone
Shaung BhoneOP14mo ago
I removed Toggle and make a action button.
Want results from more Discord servers?
Add your server