Topic: Multiple button submit tags
I am trying to create a form that will have two buttons that both write information to a database. The first button will write the information and load a new instance of the original form (page 1) using the "create" function. The other button will write the information and load the next sequential page (page 2) using the "create_next" function. I have tested both of these functions and they are working fine.
Where my problem lies is that I can not get both buttons to work at the same time either they both do the same thing or one does nothing at all. Here is the code I have in my new.rhtml file, which appears to be where the problem is.
<%= start_form_tag %>
<%= render :partial => 'form' %>
<%= submit_tag ('Save & Add Another', :action => 'create') %>
<%= submit_tag ('Next', :action => 'create_next') %>
<%= end_form_tag %>
Thank you in advance for your help.