Show a Step Wizard for a Simple Resource
How do I show a step wizard for a simple resource? When I try to add trait HasWizard, its form method conflicts with Resource as one has the method as static whereas other doesn't. Is there a way to specify that this resource uses a wizard instead of a form?
3 Replies
Simple resource as in create or edit? for simple that's a modal, so you would tend to do this on the action with -->steps([Step schemas])
otherwise you can use
Wizard::make('steps')->schema([Steps])
in the resource form
Yes, I'm referring to a modal. If I include wizard in a form then there are Create and Cancel buttons outside the wizard, which I don't want. I want to show just the wizard with its back, next and create buttons.
So you need to use:
->steps() and see:
https://filamentphp.com/docs/3.x/forms/layout/wizard#rendering-a-submit-button-on-the-last-step