Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Wiz // Gravity Forms // Set Form Target Property
<?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
You can’t perform that action at this time.