Created
July 28, 2016 17:34
-
-
Save danielkellyio/d4e62a19273db91ec75531d3c35a9313 to your computer and use it in GitHub Desktop.
Open a duped form in Gravity Forms
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
//Open Duped to Edit | |
add_action( 'gform_after_duplicate_form', 'open_new_form', 10, 2 ); | |
function open_new_form($form_id, $new_id){ | |
$url = $_SERVER['SERVER_NAME'] . "/wp-admin/admin.php?page=gf_edit_forms&id=" . $new_id; | |
echo "<script>window.location = 'http://$url&duped=true'</script>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment