Skip to content

Instantly share code, notes, and snippets.

@maddisondesigns
Last active December 21, 2015 03:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maddisondesigns/8329797ffbad4a542048 to your computer and use it in GitHub Desktop.
Save maddisondesigns/8329797ffbad4a542048 to your computer and use it in GitHub Desktop.
Filter the Gravity Forms button type to change it to a proper button
<?php
/*
* mytheme_form_submit_button
*
* Filter the Gravity Forms button type to change it to a proper button
*/
function mytheme_form_submit_button( $button, $form ) {
$button = str_replace( "input", "button", $button );
$button = str_replace( "/", "", $button );
$button .= "{$form['button']['text']}</button>";
return $button;
}
add_filter( "gform_submit_button", "mytheme_form_submit_button", 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment