© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Dekus

Open action modals inside a modal

Hi everyone,

I have a form to edit a resource, following there will be the code. I render this form inside a filament blade modal that I handle using Alpine.js.

I have two questions, can I put a submit button as a action? So using the builder instead of writing it into the template.

Second question, can I use requiresConfirmation() inside the modal? Because it doesn't work. To be fair I tried it also outside the modal and It doesn't work. No js error, it just goes straight with the request.

public function editTaskForm(Form $form): Form
    {
        return $form
            ->schema([
                TextInput::make('name')
                    ->required(),
                Textarea::make('description'),
                DatePicker::make('start_date')
                    ->required(),
                DatePicker::make('end_date')
                    ->required(),
                Actions::make([
                    Action::make('Delete task')
                        ->link()
                        ->color('danger')
                        ->action('deleteTask')
                        ->requiresConfirmation()
                ])
            ])->statePath('editTaskData');
    }
public function editTaskForm(Form $form): Form
    {
        return $form
            ->schema([
                TextInput::make('name')
                    ->required(),
                Textarea::make('description'),
                DatePicker::make('start_date')
                    ->required(),
                DatePicker::make('end_date')
                    ->required(),
                Actions::make([
                    Action::make('Delete task')
                        ->link()
                        ->color('danger')
                        ->action('deleteTask')
                        ->requiresConfirmation()
                ])
            ])->statePath('editTaskData');
    }


 <x-filament::modal id="edit-task">
        <x-slot name="heading">
            Modifica il task
        </x-slot>

        <x-slot name="description">
            Modal description
        </x-slot>
        <form wire:submit="editTask">
            {{ $this->editTaskForm }}

            <x-filament::button type="submit">
                Submit
            </x-filament::button>

            
            <x-filament-actions::modals />
        </form>
    </x-filament::modal>
 <x-filament::modal id="edit-task">
        <x-slot name="heading">
            Modifica il task
        </x-slot>

        <x-slot name="description">
            Modal description
        </x-slot>
        <form wire:submit="editTask">
            {{ $this->editTaskForm }}

            <x-filament::button type="submit">
                Submit
            </x-filament::button>

            
            <x-filament-actions::modals />
        </form>
    </x-filament::modal>
Solution
Seems like "<x-filament-actions::modals />" broke the action modals.
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

open modal inside a modal
FilamentFFilament / ❓┊help
3y ago
open a custom popup inside a modal action?
FilamentFFilament / ❓┊help
2y ago
Open a Modal from inside of an Action
FilamentFFilament / ❓┊help
2y ago
its possible to open a modal inside an action modal?
FilamentFFilament / ❓┊help
3y ago