© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Jon Mason

modal not closing on form submit

I have the below modal, and at the end of my
save()
save()
method, I'm closing the modal, but nothing happens. The close button on the modal itself works without any issue.

<x-filament::modal slide-over id="create-vendor-statement-task" width="xl">
    <x-slot name="trigger">
        <x-filament::icon-button size="lg" icon="heroicon-o-plus-circle" class="text-mwfNavy-600" style="margin-left: -14px; margin-right: 0px;" />
    </x-slot>

    <x-slot name="heading">
        Create Task
    </x-slot>

    <form wire:submit="save">
        {{ $this->form }}
    </form>

    <x-slot name="footer">
        <x-filament::button type="submit" class="mt-2 " size="sm">
            Save
        </x-filament::button>
        <button type="button" wire:click="$dispatch('close-modal', { id: 'create-vendor-statement-task'} )" class="self-end rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">Close</button>
    </x-slot>
</x-filament::modal>
<x-filament::modal slide-over id="create-vendor-statement-task" width="xl">
    <x-slot name="trigger">
        <x-filament::icon-button size="lg" icon="heroicon-o-plus-circle" class="text-mwfNavy-600" style="margin-left: -14px; margin-right: 0px;" />
    </x-slot>

    <x-slot name="heading">
        Create Task
    </x-slot>

    <form wire:submit="save">
        {{ $this->form }}
    </form>

    <x-slot name="footer">
        <x-filament::button type="submit" class="mt-2 " size="sm">
            Save
        </x-filament::button>
        <button type="button" wire:click="$dispatch('close-modal', { id: 'create-vendor-statement-task'} )" class="self-end rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">Close</button>
    </x-slot>
</x-filament::modal>


 $this->dispatch('close-modal', id: 'create-vendor-statement-task');
 $this->dispatch('close-modal', id: 'create-vendor-statement-task');
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

Prevent Modal from closing on submit.
FilamentFFilament / ❓┊help
8mo ago
Is it possible to prevent a modal from closing on form submit?
FilamentFFilament / ❓┊help
3y ago
Reset modal form after submit?
FilamentFFilament / ❓┊help
3y ago