© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
12 replies
alan

Save Wizard on clicking next button with alpineClickHandler

I have a question with limited resources online. I want to auto-save responses after a step in a Wizard. From Dan's comment under this video, I learned that AlpineJS can trigger an existing action or javascript.

1. How can I log something to the console or show an alert on clicking "Next"?
2. How can I auto-save responses while using AlpineJS to trigger actions?

Here's an example snippet:

Wizard::make([  
    Wizard\Step::make(__('Step1'))  
        ->schema([  
            // ...  
        ])->afterValidation(function () {  
            Notification::make()  
                ->title('Saved successfully')  
                ->success()  
                ->send();  
            Action::make('next')  
                ->alpineClickHandler('console.log("next")');  
            }  
        )  
Wizard::make([  
    Wizard\Step::make(__('Step1'))  
        ->schema([  
            // ...  
        ])->afterValidation(function () {  
            Notification::make()  
                ->title('Saved successfully')  
                ->success()  
                ->send();  
            Action::make('next')  
                ->alpineClickHandler('console.log("next")');  
            }  
        )  


This doesn't work. afterValidation works, but Action::make('next')->alpineClickHandler doesn't

Thank you!
YouTubeFilament Daily
Filament Wizard: Summary Step with Edit Button
If you want to users to double-check the information before submitting, here's how to do it in a Wizard.

Full source code: https://filamentexamples.com/project/wizard-with-summary-overview-and-back-buttons

More Filament examples on our website: https://filamentexamples.com
Filament Wizard: Summary Step with Edit Button
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

disable wizard next button
FilamentFFilament / ❓┊help
10mo ago
Wizard skips steps when clicking next
FilamentFFilament / ❓┊help
16mo ago
Cannot save data after clicking Save button
FilamentFFilament / ❓┊help
2mo ago
Form Wizard save on every next step
FilamentFFilament / ❓┊help
3y ago