Reset and Retain data in Text Fields on RoR Forms

I apologize if this appears to be too elementary and answered before.
I need to reset a text_field (named as ‘server_name’) in my controller.
The relevant controller code is:
<%= start_form_tag :action => ‘search’%>
<%= text_field :server, :server_name, :size => 15 %>
<%= submit_tag ‘Search’ %>
<%= end_form_tag %>

Also, I need to retain the values typed by the user in the above text
Could anybody help on how to do these?
Thanks in advance.

  1. don’t use start_form_tag and end_form_tag -> they’ve been
    deprecated. Use form_tag or form_for instead.

  2. when/how do you want to reset the text field? Do you want to have a
    button that the user can press to reset the text field? If so, you
    can use javascript to do this…

  3. what do you mean “retain the values”? Retain them where? Store them
    to a database? Keep the values in the text fields if the user submits
    a form with errors? Please elaborate.