What is the rails idiom for submit buttons on forms?
All other field types have helpers, but button_to creates its
own form, so should not be used. I’ve looked in “Agile Web Dev. with
Rails” but can’t see what I should do instead.
Is this “difficult” because it runs counter to AJAX type forms?
And, related, is there a way to ensure that hitting return in a
field does not submit the form?
What is the rails idiom for submit buttons on forms?
All other field types have helpers, but button_to creates its
own form, so should not be used. I’ve looked in “Agile Web Dev. with
Rails” but can’t see what I should do instead.
And, related, is there a way to ensure that hitting return in a
field does not submit the form?
Nope, this is a browser feature. The best you can do is attach a
JavaScript event to your fields that prevents Enter from being a
submit trigger. I wonder why you’d want to do that, though, as I find
this a very important feature for me.