Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spivurno/1513f1b735844a8aa22386b43490e5fd to your computer and use it in GitHub Desktop.
Save spivurno/1513f1b735844a8aa22386b43490e5fd to your computer and use it in GitHub Desktop.
Gravity Perks // GF Better User Activation // Set Redirect URL by Entry Value
<?php
/**
* Gravity Perks // GF Better User Activation // Set Redirect URL by Entry Value
* http://gravitywiz.com/documentation/gravity-forms-better-user-activation/
*/
add_filter( 'gpbua_activation_redirect_url', function( $url, $activation ) {
/**
* @var $activation GPBUA_Activate
*/
$entry = $activation->get_signup()->lead;
// Update "123" to your target form ID.
if( $entry['form_id'] == 123 ) {
// Update "1" to the field ID containing the page ID to which you would like to redirect.
$url = get_permalink( $entry[1] );
}
return $url;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment