Simple Problem

Hi there,

I have a simple search application where a user types in there address and I return a list. I have a radio button and a drop down where the user can narrow down the search. The problem is that after the search form is submitted and the page redisplays both the drop down value and radio button return to there original values rather then the ones chosen by the user. How can I go about keeping these values? Here is my view code...

<TD><%= text_field_tag :search, params[:search], :size => 50 %></TD>   <TD><%= collection_select(:restaurant, :cuisine_id ,Cuisine.find(:all), :id, :name, :prompt => "Don't Care") %></TD>   <TD><%= submit_tag "Who Delivers?", :name => nil %> </TD> </TR> <TR>   <TD><input type="checkbox" name="checkopen">Open Now</TD>

Thanks, steve

I have a simple search application where a user types in there address and I return a list. I have a radio button and a drop down where the user can narrow down the search. The problem is that after the search form is submitted and the page redisplays both the drop down value and radio button return to there original values rather then the ones chosen by the user. How can I go about keeping these values? Here is my view code...

<TD><%= text_field_tag :search, params[:search], :size => 50 %></TD> <TD><%= collection_select(:restaurant, :cuisine_id ,Cuisine.find(:all), :id, :name, :prompt => "Don't Care") %></TD> <TD><%= submit_tag "Who Delivers?", :name => nil %> </TD> </TR> <TR> <TD><input type="checkbox" name="checkopen">Open Now</TD>

<%= check_box_tag 'checkopen', 1, params[:checkopen] == '1' %>

Something similar for collection_select...

Thanks Philip...worked like a charm.

steve

Philip Hallstrom wrote:

Is there a collection_select_tag option? I can't seem to find it?

steve

Philip Hallstrom wrote: