Forms as Livewire component and Form Restoration
I want a search form which populates the query string of the search results page, so it can be bookmarked or linked to. I want to then be able to go back, make a change to the form and then submit the new values. This works with a single Select or a single TextInput, but put the two together and it doesn't seem to.
I'm doing a redirect like this:
$this->redirectRoute('searchresults', $this->form->getState());
The test process is 1. Fill out the form & Submit. 2. See the values. 3. Click back - see the values are still in the form. 4. Submit again - we have the default data not the values that match the form! Bad!
I've attached a screencast showing this, I don't know if it will work. I would appreciate any help.
Perhaps I shouldn't be using Filament for this job, any thoughts appreciated
1 Reply
I've added a name to the attribute and then made the form use a standard <form action="" get=""> formulation which will hobble other functionality and therefore isn't great. It feels like I've got the wrong approach. But on the other hand, choosing some search criteria, seeing the results, and then going back to change it seems a fairly normal user interaction