Strategy11/formidable-forms

More flexibility for input[type="submit"] selector in formidable.js

Closed this issue · 1 comments

The script formidable.js uses the selector input[type="submit"] in several spots, notably to disable the submit button while checking for errors in the function getFormErrors. This selector may not be flexible enough for users who customize the form HTML in the form settings. For example, I often change the code for submit buttons from the default <input type="submit" [button_action] value="[button_label]" /> to <button type="submit" [button_action] />[button_label]</button>. The button html element allows for psuedo elements, and therefore much more flexibility for styling. However, changing the submit to a button breaks Formidable's disable functionality and allows multiple clicks and submits.

The default HTML has been switched to use instead of . This change will be included in v2.3. Thanks!