Hi guys,
I need to change the markup of a specific form; I’ve seen this can be achieved with using filters - but what I can’t find anywhere is how to apply this to one specific form, rather than all forms.
I tried something like below but had no luck:
add_filter( 'gform_submit_button', 'form_submit_button', 10, 2 );
function form_submit_button( $button, $form ) {
$result = GFAPI::get_form(4);
if ( $result ) {
return "<button class='button gform_button' id='gform_submit_button_{$form['id']}'><span>Submit</span></button>";
}
}
Thank you