© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
8 replies
Mike Peters

requiresConfirmation doesn't seem to work on form submit action

hi all!
I'm adding a custom form on a custom page but can't seem to add requiresConfirmation() to the form submit.

The Form part:
        return $form
            ->schema([
                Select::make('tags')
                    ->options($tags ? array_combine($tags, $tags) : [])
                    ->required()
                    ->minItems(1)
                    ->multiple()
                    ->searchable()
            ])
            ->statePath('clearCacheFormData');
        return $form
            ->schema([
                Select::make('tags')
                    ->options($tags ? array_combine($tags, $tags) : [])
                    ->required()
                    ->minItems(1)
                    ->multiple()
                    ->searchable()
            ])
            ->statePath('clearCacheFormData');


The blade;

<x-filament-panels::page>

        <x-filament::section>
            <x-slot name="heading">
                Cache legen
            </x-slot>

            <form wire:submit="clearCache">
                <div class="mb-4">
                    {{ $this->clearCacheForm }}
                </div>

                <x-filament-panels::form.actions :actions="[$this->getClearCacheSaveAction()]"/>
            </form>
        </x-filament::section>
<x-filament-panels::page>

        <x-filament::section>
            <x-slot name="heading">
                Cache legen
            </x-slot>

            <form wire:submit="clearCache">
                <div class="mb-4">
                    {{ $this->clearCacheForm }}
                </div>

                <x-filament-panels::form.actions :actions="[$this->getClearCacheSaveAction()]"/>
            </form>
        </x-filament::section>


The action method;

    public function getClearCacheSaveAction(): Action
    {
        return Action::make('save')
            ->label('Geselecteerde caches legen')
            ->requiresConfirmation()
            ->submit('clearCache');
    }
    public function getClearCacheSaveAction(): Action
    {
        return Action::make('save')
            ->label('Geselecteerde caches legen')
            ->requiresConfirmation()
            ->submit('clearCache');
    }


- Why is the requiresConfirmation not firing?
- Do you see general improvements in this custom form approach?

Thanks!!
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

Submit - requiresConfirmation
FilamentFFilament / ❓┊help
3y ago
Secondary Modal Submit Action with RequiresConfirmation
FilamentFFilament / ❓┊help
13mo ago
EditForm - can't submit form action on set on form header actions
FilamentFFilament / ❓┊help
3y ago
requiresConfirmation - Disable Submit?
FilamentFFilament / ❓┊help
3y ago