Skip to content

Instantly share code, notes, and snippets.

@eriteric
Created May 7, 2020 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eriteric/aed8f197c4250a2b38e139f180f3fc17 to your computer and use it in GitHub Desktop.
Save eriteric/aed8f197c4250a2b38e139f180f3fc17 to your computer and use it in GitHub Desktop.
Change Gravity Forms Submit Input to a Button Element
// change Gravity Forms submit input to a button element
add_filter( 'gform_submit_button', __NAMESPACE__.'\\form_submit_button', 10, 5 );
function form_submit_button ( $button, $form ){
$button = str_replace( "input", "button", $button );
$button = str_replace( "/", "", $button );
$button .= "{$form['button']['text']}</button>";
return $button;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment