Last active
August 29, 2015 14:06
-
-
Save OatmealBath/805cfe4d6524004dc56b to your computer and use it in GitHub Desktop.
Redirect Gravity Forms to Wordpress page by id
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
// in functions.php | |
add_filter("gform_confirmation", "custom_confirmation", 10, 4); | |
function custom_confirmation($confirmation, $form, $lead, $ajax){ | |
if($form["id"] == "1"){ | |
$confirmation = array("redirect" =>get_page_link(191)); | |
} | |
else if($form["id"] == "2"){ | |
$confirmation = array("redirect" =>get_page_link(191)); | |
} | |
// and on and on | |
return $confirmation; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment