Hi.. new to the whole Rails thing so this may sound aweful strange but I cannot find any documentation supporting or correcting what I am trying to do..
I would like to have 2 separate form_tag's displayed on a single page. They both have varying function so my thinking is 2 separate form_tag's (am I wrong).
My problem is when the page renders it only renders 1 form but housing the varu=ious components of each form_tag (eg. input boxes, submit button etc). There are 2 submit buttons for each of the functions Im wanting to perfom but because they are caught up under the one form_tag, it doesnt matter which one I press, only the one action is ever performed..
As mentioned, very new so not sure what I should be doing..
<%= form_tag(:controller => 'public', :action => 'send_login') %> <%= error_messages_for 'user' %> <table> <tr> <th>user name :</th> <td><%= text_field(:user, :username) %></td> </tr> <tr> <th>password :</th> <td><%= password_field(:user, :password) %></td> </tr> <tr> <th></th> <td><%= submit_tag('Login') %> | <%= link_to('new venue', :controller => 'venue', :action => 'new') %></td> </tr> </table> <%= form_tag %>
<!-- User feedback section shown below --> <h2>Commenter Login</h2>
<%= form_tag('send_feedback', :controller => 'public', :action => 'send_fedback') %> <%= error_messages_for 'temp' %> <table> <tr> <th>venue code :</th> <td><%= text_field(:comments, :restaurant_id) %></td> </tr> <tr> <th></th> <td><%= submit_tag('Feedback') %></td> </tr> </table> <%= form_tag %>