Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook allows you to add HTML to the submit button.
Formidable Forms is the best WordPress Form Builder plugin. Get it for free!
Usage
add_action('frm_submit_button_action', 'your_function_name');
Parameters
- $form (object)
- $form_action (string)
Examples
Add OnClick event
Use this code to add an OnClick event to a particular submit button.
add_action('frm_submit_button_action', 'your_function_name');
function your_function_name($form){
if($form->id == 5){ //change 5 to the ID of the form you would like this inserted in
echo ' onclick="do something"';
}
}
Turn off HTML5 browser validation
Prevent error codes from showing via browser tooltips.
add_action('frm_submit_button_action', 'dont_validate_this');
function dont_validate_this(){
echo ' formnovalidate="true"';
}