© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
urbycoz

How can I make my form action show a confirmation modal?

I have a form with a delete action. I want it to fire the doDelete() method when clicked. But I want a confirmation modal to show first. However the code below doesn't seem to work. When I click the button nothing shows.

If I take out the ->requiresConfirmation() then the doDelete() method is fired fine.

public function form(Form $form): Form
    {
        return $form
            ->schema([
...
                Actions::make([
                    Action::make('delete')
                        ->requiresConfirmation() // This doesn't make a modal show
                        ->action(function () {
                            $this->doDelete($this->item->id);
                        })
                ]),
        ]);
    }
public function form(Form $form): Form
    {
        return $form
            ->schema([
...
                Actions::make([
                    Action::make('delete')
                        ->requiresConfirmation() // This doesn't make a modal show
                        ->action(function () {
                            $this->doDelete($this->item->id);
                        })
                ]),
        ]);
    }
Solution
Did you add
<x-filament-actions::modals />
<x-filament-actions::modals />
in the view?
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

How can I conditionally show a confirmation modal during a resource edit form save.
FilamentFFilament / ❓┊help
9mo ago
Confirmation modal before action.
FilamentFFilament / ❓┊help
3y ago
How to close action confirmation modal after form validate fails?
FilamentFFilament / ❓┊help
2y ago
ToggleColumn and Modal Confirmation (Action?)
FilamentFFilament / ❓┊help
3y ago