Serve forms from controller

I'm building a process where creating an order will need to serve multiple forms in stages and then save the data each time along with the step number so they can go back to the order. Depending on choices different forms will be served. In ordinary PHP I would have a controller to do the selection of forms and data processing. Can I somehow do that but serve filament forms instead of normal html forms and return the data after completion? Thanks a lot Mike
Solution:
So you add the form to a component, depending on the step will depend on the schema it loads in, the schema could be array return functions within the component.
Jump to solution
8 Replies
toeknee
toeknee2mo ago
Yeah of course, just do the forms in an array schema and return them accordingly. Rememebr forms are build of 'array' of Input Classes
opensaucemike
opensaucemikeOP2mo ago
Thanks @toeknee How do I access the form data in a controller as I'm only used to Filament doing it all by itself
toeknee
toeknee2mo ago
Questiomn.. why use a controller and not a dynamic livewire page?
opensaucemike
opensaucemikeOP2mo ago
Lack of knowledge 🙂
toeknee
toeknee2mo ago
So don't do it then hehe and skill up! I would tend to recommend a livewire page/class for the form, this livewire form can the be called in any blade.
Solution
toeknee
toeknee2mo ago
So you add the form to a component, depending on the step will depend on the schema it loads in, the schema could be array return functions within the component.
opensaucemike
opensaucemikeOP2mo ago
Thanks @toeknee. I appreciate the pointers.

Did you find this page helpful?