<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Custom Thank you page based on select field choice.</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice</link>
		<description>Gravity Support Forums Topic: Custom Thank you page based on select field choice.</description>
		<language>en-US</language>
		<pubDate>Wed, 22 Apr 2026 10:57:43 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/custom-thank-you-page-based-on-select-field-choice" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-97553</link>
			<pubDate>Sat, 01 Dec 2012 02:08:24 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">97553@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@Brian, please change all references of $entry['1'] to $lead['1'].  There was a mistake in my earlier code.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brianharrington on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-88974</link>
			<pubDate>Thu, 08 Nov 2012 20:20:14 +0000</pubDate>
			<dc:creator>brianharrington</dc:creator>
			<guid isPermaLink="false">88974@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Havent heard back, I went ahead and tried with a fresh copy of wordpress with 2011 theme. Still doesn't work.&#60;/p&#62;
&#60;p&#62;Please respond.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brianharrington on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-88132</link>
			<pubDate>Tue, 06 Nov 2012 22:01:13 +0000</pubDate>
			<dc:creator>brianharrington</dc:creator>
			<guid isPermaLink="false">88132@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;After some more investigation, if i use the below, it will redirect to 1.com regardless of what i choose in the drop down.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_confirmation_2&#38;#39;, &#38;#39;confirmation_redirect&#38;#39;, 10, 4);
function confirmation_redirect($confirmation, $form, $lead, $ajax){

  if($entry[&#38;#39;1&#38;#39;] == &#38;#39;&#38;#39;){
    $confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt;&#38;#39;http://www.1.com&#38;#39;);
  }
  else if($entry[&#38;#39;1&#38;#39;] == &#38;#39;2&#38;#39;){
    $confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt;&#38;#39;http://www.2.com&#38;#39;);
  }

  return $confirmation;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>brianharrington on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-87719</link>
			<pubDate>Mon, 05 Nov 2012 21:18:59 +0000</pubDate>
			<dc:creator>brianharrington</dc:creator>
			<guid isPermaLink="false">87719@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This didnt work for me, though the example in the link above did.&#60;/p&#62;
&#60;p&#62;Here is my code. Form id of 2. There is 1 drop down field with 2 choices: &#34;1&#34; and &#34;2&#34;&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_confirmation_2&#38;#39;, &#38;#39;confirmation_redirect&#38;#39;, 10, 4);
function confirmation_redirect($confirmation, $form, $lead, $ajax){

  if($entry[&#38;#39;1&#38;#39;] == &#38;#39;1&#38;#39;){
    $confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt;&#38;#39;http://www.1.com&#38;#39;);
  }
  else if($entry[&#38;#39;1&#38;#39;] == &#38;#39;2&#38;#39;){
    $confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt;&#38;#39;http://www.2.com&#38;#39;);
  }

  return $confirmation;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-86547</link>
			<pubDate>Fri, 02 Nov 2012 06:15:55 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">86547@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That code will go in your theme's functions.php.&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F#PHP&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F#PHP&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You will need to change the 2 on line 3 to your form ID, and we're checking the value of field 5 in your form on lines 7 and 10.  You can add more if statements there, or use a &#60;a href=&#34;http://php.net/manual/en/control-structures.switch.php&#34; rel=&#34;nofollow&#34;&#62;php switch/case&#60;/a&#62; statement if you have a lot of possibilities.  Change the 5 on those two lines to the ID of the field you want to check the value of.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-86545</link>
			<pubDate>Fri, 02 Nov 2012 06:13:46 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">86545@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can use the gform_confirmation filter in your theme's functions.php to change the confirmation URL based on a choice in your form.  Documentation: &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_confirmation&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_confirmation&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The code you use will look something like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
&#38;lt;?php
// change the 2 here to your form ID or remove the _2 to apply this to all forms
add_filter(&#38;#39;gform_confirmation_2&#38;#39;, &#38;#39;confirmation_redirect&#38;#39;, 10, 4);
function confirmation_redirect($confirmation, $form, $lead, $ajax){

	// this will change the redirect URL based on the answer for field 5 in your form
	if($lead[&#38;#39;5&#38;#39;] == &#38;#39;turtles&#38;#39;){
		$confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt;&#38;#39;http://www.example.com/turtle-information/&#38;#39;);
	}
	else if($lead[&#38;#39;5&#38;#39;] == &#38;#39;frogs&#38;#39;){
		$confirmation = array(&#38;#39;redirect&#38;#39; =&#38;gt;&#38;#39;http://www.example.com/for-the-love-of-frogs/&#38;#39;);
	}

	return $confirmation;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;EDITED: 1 December 2012 chrishajer
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-86541</link>
			<pubDate>Fri, 02 Nov 2012 06:07:35 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">86541@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Continued from here:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/custom-thank-you-pages-based-on-drop-down-field&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/custom-thank-you-pages-based-on-drop-down-field&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brianharrington on "Custom Thank you page based on select field choice."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-thank-you-page-based-on-select-field-choice#post-86214</link>
			<pubDate>Thu, 01 Nov 2012 10:56:15 +0000</pubDate>
			<dc:creator>brianharrington</dc:creator>
			<guid isPermaLink="false">86214@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is it possible to have different thank you pages based on a drop down field in the form?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
