Bug: Multiple Submit Buttons w/ form_remote_tag

I’ve run across a problem when attempting to submit a form with the
form_remote_tag when the form contains multiple submit buttons.

My form contains 2 submit buttons, a “Preview” button and a “Post
Message” button:
<%= submit_tag ‘Preview’ %>
<%= submit_tag ‘Post Message’ %>

When the form is submitted, the value of @params[‘commit’] is the
value of the first submit tag (‘Preview’ in this case) no matter what
button is used to submit the form.

This is not present when changing the form to a standard non-ajax form.

Any one else run across this problem or have a suggested fix?


Derek H.
HighGroove Studios - http://www.highgroove.com
Atlanta, GA
Keeping it Simple.
404.593.4879