title: One submit tag, two forms on same page
body: <p>I am looking for the best approach to this problem. I have two search forms on the same page ( they each search a a different api for info) and I would like to have one submit button and then the relevant api is called dependent on which form has content. So I though I could specify the controller action when submitting on each form like so</p>
  
  <pre><code>&lt;div class="container margin50"&gt;
   &lt;div class="row"&gt;
    &lt;div class="span6 offset3 cf formBackground"&gt;
    &lt;h1&gt;CoverArt Finder&lt;/h1&gt;
  
    &lt;h3&gt;Search Movies&lt;/h3&gt;
    &lt;%= form_tag main_results_path, :method =&gt; "get" %&gt;
    &lt;%= text_field_tag 'search', nil, :placeholder =&gt; 'Enter Film Name Here.....' %&gt;
  
    &lt;h1&gt;OR&lt;h1&gt;
  
    &lt;h3&gt;Search Albums&lt;/h3&gt;
    &lt;%= form_tag album_album_results_path, :method =&gt; "get" %&gt;
    &lt;%= text_field_tag 'search', nil, :placeholder =&gt; 'Enter Artist Name here.....' %&gt;
    &lt;%= submit_tag "search" %&gt;
  
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Obviously this is not working as i always get the results for the movie search parameters. Do i need a conditional statement in there to recognise which form is filled in? I’m a little unsure here.</p>
  
  <p>Any other info needed please ask</p>
  
  <p>Any help appreciated</p>
  
  <p>Thanks</p>