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
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"
Thank you let me try this out
Interesting question, how do I access the form values and the record in the afterValidation method?
how to change the label of next button to 'Save & next'?
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Components\Wizard;
Wizard::make([
// ...
])
->nextAction(
fn (Action $action) => $action->label('Save & next'),
)