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');


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>


The action method;

    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!!
Was this page helpful?