Saving Wizard Form Contents at Each Step

I am looking to automatically save the entries in a wizard step each time the next one is called, is there anything special that I need to take into account? Do I need to manually take care of loading the contents from the model to continue later Thank you in advance
5 Replies
petrisorcraciun
Step::make('step1')->afterValidation(function() { your_code} ); you have two point which can be used: afterValidated(afterValidation) or beforeValidation is in "Filament\Forms\Components\Wizard\Step"
ssmusoke
ssmusokeOP2y ago
Thank you let me try this out Interesting question, how do I access the form values and the record in the afterValidation method?
Shipu Ahamed
Shipu Ahamed17mo ago
->afterValidation(function ($state, $livewire, $component) {
// do magical things
})
->afterValidation(function ($state, $livewire, $component) {
// do magical things
})
.najibahmed
.najibahmed16mo ago
how to change the label of next button to 'Save & next'?
Atreides
Atreides5mo ago
use Filament\Forms\Components\Actions\Action; use Filament\Forms\Components\Wizard; Wizard::make([ // ... ]) ->nextAction( fn (Action $action) => $action->label('Save & next'), )

Did you find this page helpful?