Forum: Ruby on Rails Form Validation without a Model (Showing the users input whe

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
54a6fc785e9fcf73ead8e387432b32f5?d=identicon&s=25 Dan Harper (Guest)
on 2007-03-15 16:14
(Received via mailing list)
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

  1. user fills in the search text field with "Dan"
  2. user hits submit
  3. the user forgot to select a value from a drop down box (eg
search on first name)
  4. renders the form with the error message added to flash
  5. 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?

52cb4115a870ff1942e7e1ae96f4306f?d=identicon&s=25 Tyler MacDonald (Guest)
on 2007-03-15 16:23
(Received via mailing list)
This looks like a pretty good solution:


Dan Harper <> wrote:
>   2. user hits submit
> Dan
> >

This topic is locked and can not be replied to.