alan
Save Wizard on clicking next button with alpineClickHandler
Ok nice thank you it worked
However, since I have multiple steps in the wizard, this approach results in repetitive code and creates unnecessary overhead. Is there a more maintainable method that can be used across all steps in Filament?
And just to be sure: afterValidation only executes after successful validations, right?
13 replies
Save Wizard on clicking next button with alpineClickHandler
Thanks @Matthew but unfortunately I don't know how to approach this. In my earlier messages I think I wrote something similar to an action handler but my question is: how can I distinct between edit and creating?
this is my current state of code
Models/Form.php
Filament/Resources/FormResource.php
Filament/Resources/FormResource/Pages/CreateForm.php
Filament/Resources/FormResource/Pages/EditForm.php
13 replies
Save Wizard on clicking next button with alpineClickHandler
@toeknee thanks for your help
I want to save it only, when I'm editing a record. That's why it won't work. Also I have 10 steps so calling this function after each step seems a bit too much
13 replies
Save Wizard on clicking next button with alpineClickHandler
I found a way to save the form when clicking "Next." But the problem is that I only want to save the form when it’s already created and I'm editing it. Otherwise, I get errors when the entry isn't created yet, as I can't save something that isn’t created. So, how can I limit it so the
$wire.save()
function gets called only when editing?
Additionally I would like to disable the creation notification.13 replies