Wizard not submitting data on final step

Hi. I'm having a problem with a Wizard. It has four data entry steps and a final Review step consisting of just placeholders. I need to customise the model creation process at the end which I'm doing with handleRecordCreation in my Page class. If I include the final Review step, the $data being supplied to the Page class is empty. If I remove the Review step, the $data contains everything from all steps. I guess I'm doing something wrong but I can't see what. Any help appreciated. When included, all form data is correctly displayed in the "Review" step placeholders right before submit. It appears to be the case that anything I include as a placeholder on the final step gets wiped from state. For example, if I include the final step with just a message, all data is submitted. I've attached a summary of the Wizard generation and a chunk of the final Step where I make placeholders.
No description
No description
Solution:
aha - it wasn't that but it did point me in the right direction. The problem was not the uniqueness of the Placeholder name, it was using the same name for Placeholders as the Form state name. So using Placeholder::make('name') killed the form state for TextInput::make('name'). thanks for taking the time to look...
Jump to solution
6 Replies
LeandroFerreira
LeandroFerreira2mo ago
What do you have in the review step?
darrenm
darrenm2mo ago
it's probably too long to fit in here, there's a screen grab of a representative bit of it above. It's all an array of Section::make() which each have a series of Placeholder::make()
LeandroFerreira
LeandroFerreira2mo ago
it is difficult to assist you without the code probably something in your review step.. you need to check it
darrenm
darrenm2mo ago
It's a bit of a monster, and a work-in-progress, but here's the entire thing: https://gist.github.com/dmlogic/748fc1ed8a4273b173de4fc8a7278d0e
Gist
Filament Event model creation page
Filament Event model creation page. GitHub Gist: instantly share code, notes, and snippets.
LeandroFerreira
LeandroFerreira2mo ago
try to use unique names Placeholder::make('xx_name') Placeholder::make('yy_name')
Solution
darrenm
darrenm2mo ago
aha - it wasn't that but it did point me in the right direction. The problem was not the uniqueness of the Placeholder name, it was using the same name for Placeholders as the Form state name. So using Placeholder::make('name') killed the form state for TextInput::make('name'). thanks for taking the time to look
Want results from more Discord servers?
Add your server