URL Query Parameters on Filament Resource
Hi, I have a resource where I use wizard, the steps are a bit too many and data entry takes a long time, so I don't want the user to lose their data when the page is refreshed, I used “persistStepInQueryString” for the wizard, but I couldn't find anything to not lose the form data (like URL Query Parameters). Does anyone have info about this?
4 Replies
I’d say the best best would be storing the form data in a session, then pulling it back out of the session. Potentially, some caveats with that, but a wizard is a full form, so the page shouldn’t be reloading before the form is submitted.
Hmm, I can remove the wizard is there any possibility to do this in a normal resource form? Without Session.
Or is there an easy way to use Laravel's old() function?
Do you need a wizard? Sounds like you do. So, the real question is what is triggering a page reload during the process of filling out the form? But if the page is reloaded the current state has to be stored somewhere and rehydrated back into the form.
And typically that would be done with session, or localStorage in the browser. Just sounds to me like something isn’t quite being handled correctly. But I could be wrong.
What refreshes the page is that the user adds the data from the phone and the phone rings while entering, etc. I think I will do it with session, I just wondered if there was a helper or package for this.