FilamentF
Filament2y ago
Max

add requiresConfirmation to save action on Edit - Resource

Hey there, im trying to add a conditional conformation message when the user clicks the save button on the edit form. Any help?
Solution
protected function getSaveFormAction(): Action
{
    return parent::getSaveFormAction()
        ->submit(null)
        ->requiresConfirmation()
        ->action(function () {
            $this->closeActionModal();
            $this->save();
        });
}
Was this page helpful?