Last active
April 4, 2016 05:24
-
-
Save spivurno/ab0626e5c2fef4db1f2b to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms // Set Form Target Property
This file contains 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 | |
/** | |
* Gravity Wiz // Gravity Forms // Set Form Target Property | |
* This example sets the target to "_parent"; useful when loading a form in an iframe and submitting the form to the parent page instead of reloading in the iframe. | |
*/ | |
add_filter( 'gform_form_tag_1237', function( $tag, $form ) { | |
return str_replace( '>', ' target="_parent">', $tag ); | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment