I have a basic form using the form_tag helper working fine, but I want to add a cancel button, what is the syntax for doing this? I want the cancel button to appear as a button, not a link, then take the user to a different URL (indicating they don't want to submit the form).
TY, Fred
If you mean a reset button, paste the following inside your form:
<%= button_tag "Reset", type: :reset %>
Tested it, it works fine and resets all fields in the form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With