title: How to use form_tag to update params
body: <p>I have been struggling with a problem in Rails for a couple of days and still could not find the solution. Could you help me with that?</p>
  
  <p>Problem: I have a search box that puts a :search_string entry in the params structure. I use a form_tag for that and it works fine.</p>
  
  <pre><code>&lt;% form_tag :controller=&gt; 'items', :action =&gt; 'find' do %&gt;
      &lt;%= text_field_tag :search_string, params[:search_string] %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>The problem is when I want to add and update other params key-value (in another view), for instance :start_date, to filter the search_string result. Here is the code snipped that I use in the view:</p>
  
  <pre><code>&lt;% form_tag :controller=&gt; "items", :action =&gt; "find", :params =&gt; params do %&gt;
      &lt;%= hidden_field_tag  :date_start,  '2010-04-01' %&gt;
      &lt;%= submit_tag 'April' %&gt;
  &lt;% end %&gt;
  
  &lt;% form_tag :controller=&gt; "items", :action =&gt; "find", :params =&gt; params do %&gt;
      &lt;%= hidden_field_tag  :date_start,  '2010-03-01' %&gt;
      &lt;%= submit_tag 'March' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>When I first click on "April" submit button, then the params is correctly passed to the controller (i.e. there is a params[:start_date]='April'). However when I try to click "March" button afterwards, the params[:start_date] is not updated. I definitely think this is a stupid newbie mistake, but I cannot figure out how to properly use the form_tag. Could you tell me if I am doing something work? Otherwise, could you advise me which is the best way to update the params using form_tag's ? Thank you very much in advance.</p>
  
  <p>Miquel</p>