Hi all,
I’m writing a Advanced Search form which is not attached to a model
and I’m wondering if there’s an easy way to re-show the the form to
the user with their inputted values shown back to them if validation
fails.
Example:
- user fills in the search text field with “Dan”
- user hits submit
- the user forgot to select a value from a drop down box (eg
search on first name) - renders the form with the error message added to flash
- form is blank!
Of course this works (the users’ inputted values are re-shown) for
form helpers that are based on a model, but what if it’s a form like
a search form?
Cheers,
Dan