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 change the HTML of the submit button before it applies the custom submit button classes.
Usage
add_filter( 'frm_submit_button_html', 'add_custom_html_to_submit_button');
Parameters
- $button (string)
- $args (array)
Examples
Add custom HTML to submit button
add_filter( 'frm_submit_button_html', 'add_custom_html_to_submit_button', 10, 2 );
function add_custom_html_to_submit_button( $button, $args ) {
$target_form_id = 220; // change 220 to the ID of the form
if ( $target_form_id === (int) $args['form']->id ) {
// put HTML before the submit button
$button = 'content before the submit button' . $button;
// put HTML after the submit button
$button .= 'additional submit button HTML';
}
return $button;
}