I am using simple_form and the following code to create the button.
<%= form.action :submit, :value => "submit", :button_html => { :class => "lagoon" } %>
However the button is (still) labeled 'Create User' instead of 'submit'. I thought setting the value => would do it but it didn't
Input value attribute The value attribute can be used to change the text of the form submit button. Use value attribute within <input> of type="submit" to rename the button. Example: Change the text of form submit button
The Submit Button allows a user to trigger submission of the form. The submit button is automatically included on any new form. Submit button settings are available under the Field Settings tab when the submit button element is in focus within the form editor. Submit button as displayed in the Form Editor.
By default, the submit button on any form created using Gravity Forms simply reads ‘Submit’. However, we recommend that, for the majority of situations, you customize this text, adding a clear CTA that is relevant to your form and appeals to your audience.
Note that hiding the submit button can cause usability issues, which can negatively affect the accessibility of your form. Prior to Gravity Forms version 2.6, the submit button settings were located within Form Settings.
Probably better and correct way is to use :label key and keep :button_html for styling
<%= form.action :submit, :label => "Submit", :button_html => { :class => "lagoon" } %>
I think best idea is to use I18n keys. Check Formtastic docs:
Formtastic decides which label to use in the following order:
https://github.com/justinfrench/formtastic
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