© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
13 replies
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();
        });
}
protected function getSaveFormAction(): Action
{
    return parent::getSaveFormAction()
        ->submit(null)
        ->requiresConfirmation()
        ->action(function () {
            $this->closeActionModal();
            $this->save();
        });
}
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Add requiresConfirmation to save or create action with validation
FilamentFFilament / ❓┊help
17mo ago
Add another button to Action requiresConfirmation()
FilamentFFilament / ❓┊help
2y ago
Custom action on edit resource
FilamentFFilament / ❓┊help
3y ago
How to add requiresConfirmation() into modalSubmitAction() in Action
FilamentFFilament / ❓┊help
3y ago