Last active
December 21, 2015 03:51
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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