<?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: Conditional Redirect with sidebar form while keeping field data</title>
		<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data</link>
		<description>Gravity Support Forums Topic: Conditional Redirect with sidebar form while keeping field data</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 10:09:47 +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/conditional-redirect-with-sidebar-form-while-keeping-field-data" rel="self" type="application/rss+xml" />

		<item>
			<title>Austin Web and Design on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-99742</link>
			<pubDate>Thu, 06 Dec 2012 16:07:57 +0000</pubDate>
			<dc:creator>Austin Web and Design</dc:creator>
			<guid isPermaLink="false">99742@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry about that. All the code in the php doc is shown here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/exxUTkph&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/exxUTkph&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If there is supposed to be supplemental code in other files then I don't have them.&#60;/p&#62;
&#60;p&#62;I still get a syntax error with the alternate lines you gave me. As I'm sure is apparent by now, I'm not well versed in php - so I apologize for not being able to do what are probably simple alterations in syntax to you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-99623</link>
			<pubDate>Thu, 06 Dec 2012 10:12:00 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">99623@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you post all of your code, including the hook or filter you're using, and the complete function?   We need to see it in its entirety to know why it's not working, especially since you have a syntax error.&#60;/p&#62;
&#60;p&#62;One problem with this specific bit of code though is that you cannot use single quotes twice on line 3 (and any subsequent URLs you're going to build like that.) And variables will not be parsed by PHP inside single quotes.  Try these two lines instead of line 3:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/3uq3DdVk&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/3uq3DdVk&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Or, you can build the URL before the case statement if that will work for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Austin Web and Design on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-98845</link>
			<pubDate>Tue, 04 Dec 2012 14:07:44 +0000</pubDate>
			<dc:creator>Austin Web and Design</dc:creator>
			<guid isPermaLink="false">98845@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sure, it can be seen here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/NfzhRueh&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/NfzhRueh&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Note: only the top case has been changed to (try to)work with the query string.&#60;/p&#62;
&#60;p&#62;Thanks again!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-98423</link>
			<pubDate>Mon, 03 Dec 2012 15:56:41 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">98423@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The syntax highlighter or forum software here will auto link hyperlinks and add the rel='nofollow' as well.  Can you post your code at pastebin.com or pastie.org so we can see it unaltered?  Just paste the link here so we can see exactly what you are using.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Austin Web and Design on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-98398</link>
			<pubDate>Mon, 03 Dec 2012 14:43:30 +0000</pubDate>
			<dc:creator>Austin Web and Design</dc:creator>
			<guid isPermaLink="false">98398@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Whoa, don't know what I did to cause it, but line 3 of the code I just submitted certainly isn't supposed to look like that. It's&#60;/p&#62;
&#60;p&#62;case &#34;Buy a Home&#34;:&#60;br /&#62;
	        // if buy redirect to the following page&#60;br /&#62;
	        header('Location: &#60;a href=&#34;http://www.rebateagents.net/buy-form/?State=$lead&#34; rel=&#34;nofollow&#34;&#62;http://www.rebateagents.net/buy-form/?State=$lead&#60;/a&#62;'2']');&#60;br /&#62;
	        break;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Austin Web and Design on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-98396</link>
			<pubDate>Mon, 03 Dec 2012 14:40:49 +0000</pubDate>
			<dc:creator>Austin Web and Design</dc:creator>
			<guid isPermaLink="false">98396@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for the quick response! I still seem to be having an issue though. I'm receiving this error when I submit the form:&#60;/p&#62;
&#60;p&#62;Parse error: syntax error, unexpected T_LNUMBER in /home/tmueller/public_html/rebateagents.net/wp-content/themes/theme1411/page-formsplash.php on line 10&#60;/p&#62;
&#60;p&#62;Just to see the whole block, here's lines 8-11&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;case &#38;quot;Buy a Home&#38;quot;:
	        // if buy redirect to the following page
	        header(&#38;#39;Location: &#60;a href=&#34;http://www.rebateagents.net/buy-form/?State=$lead&#38;#39;2&#38;#39;&#38;#39;)&#34; rel=&#34;nofollow&#34;&#62;http://www.rebateagents.net/buy-form/?State=$lead&#38;#39;2&#38;#39;&#38;#39;)&#60;/a&#62;;
	        break;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;?State is the parameter name of the field I want to preserve and $lead['2'] is it's ID, correct? &#60;/p&#62;
&#60;p&#62;Also, if it's any help Dreamweaver code syntax flagged the single quotes surrounding 2 as an issue. Just to restate my goals, one field (Buy/Sell/Buy and Sell) is dictating which redirect to use and the only information I want carried over to the next form is which State they select in a drop down. Thanks again!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-97606</link>
			<pubDate>Sat, 01 Dec 2012 03:28:54 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">97606@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Instead of WEBSITE_URL_1, 2 and 3, those URLs will have to have query strings which contain the parameter name of the value you want to preserve.&#60;/p&#62;
&#60;p&#62;Maybe your URLs look like this in reality:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://example.com/buy-a-home/&#34; rel=&#34;nofollow&#34;&#62;http://example.com/buy-a-home/&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://example.com/sell-a-home/&#34; rel=&#34;nofollow&#34;&#62;http://example.com/sell-a-home/&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://example.com/buy-sell-home/&#34; rel=&#34;nofollow&#34;&#62;http://example.com/buy-sell-home/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;That is fine, but I am assuming you want to save maybe name and email address.  In the teaser form if your first field was a name field, and your second field was an email address, those URLs would look something like this:&#60;br /&#62;
&#38;#104;ttp://example.com/buy-a-home/?fname=$lead['1.3']&#38;amp;lname=$lead['1.6']&#38;amp;email=$lead['2']&#60;br /&#62;
&#38;#104;ttp://example.com/sell-a-home/?fname=$lead['1.3']&#38;amp;lname=$lead['1.6']&#38;amp;email=$lead['2']&#60;br /&#62;
&#38;#104;ttp://example.com/buy-sell-home/?fname=$lead['1.3']&#38;amp;lname=$lead['1.6']&#38;amp;email=$lead['2']&#60;/p&#62;
&#60;p&#62;Your second form, the form on all three of these pages, will have to have &#34;Allow field to be populated dynamically&#34; checked, and the parameter names will need to match these here:&#60;/p&#62;
&#60;p&#62;fname&#60;br /&#62;
lname&#60;br /&#62;
email&#60;/p&#62;
&#60;p&#62;Let us know if you need more help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Austin Web and Design on "Conditional Redirect with sidebar form while keeping field data"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/conditional-redirect-with-sidebar-form-while-keeping-field-data#post-97450</link>
			<pubDate>Fri, 30 Nov 2012 21:47:14 +0000</pubDate>
			<dc:creator>Austin Web and Design</dc:creator>
			<guid isPermaLink="false">97450@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I've been trying to get a teaser form to redirect to different forms based on selection while retaining field data. I've been using these two forum posts as guides: &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/terms-of-conditions#post-7442&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/terms-of-conditions#post-7442&#60;/a&#62;&#60;br /&#62;
and&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/conditional-redirects-preserving-posted-data&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/conditional-redirects-preserving-posted-data&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I was able to get it to redirect properly, but can't seem to work out keeping the field data. Here's the scenario:&#60;/p&#62;
&#60;p&#62;A teaser form has two fields. A radio button for Buy/Sell/BuyandSell and a drop down list of the state they are looking for. The radio button selection directs you to what form you will fill out and I want to retain the State in the new form you are sent to. The redirect code looks like&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$agree == $_GET[&#38;#39;BuySell&#38;#39;];
switch ($agree)
	    {

	        case &#38;quot;Buy a Home&#38;quot;:
	        // if buy redirect to the following page
	        header(&#38;quot;Location: WEBSITE_URL_1&#38;quot;);
	        break;

	        case &#38;quot;Sell a Home&#38;quot;:
	        // if sell redirect to the following page
	        header(&#38;quot;Location: WEBSITE_URL_2&#38;quot;);
	        break;

			case &#38;quot;BuySellHome&#38;quot;:
	        // if buy and sell redirect to the following page
	        header(&#38;quot;Location: WEBSITE_URL_3&#38;quot;);
	        break;        

	    }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;but couldn't incorporate either of the methods from the second post successfully. Any help at all would be greatly appreciated. Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
