<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Conditional redirect url</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Conditional redirect url</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 02:03:38 +0000</pubDate>

<item>
<title>manzoorahmed on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-24924</link>
<pubDate>Fri, 26 Feb 2016 08:07:39 +0000</pubDate>
<dc:creator>manzoorahmed</dc:creator>
<guid isPermaLink="false">24924@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thank you @williamansle&#60;/p&#62;
&#60;p&#62;For this I have to update to 4.7. I will do that and let you know if there is any issue.&#60;/p&#62;
&#60;p&#62;Regards,&#60;/p&#62;
&#60;p&#62;Manzoor
&#60;/p&#62;</description>
</item>
<item>
<title>williamansley on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-24921</link>
<pubDate>Fri, 26 Feb 2016 02:16:09 +0000</pubDate>
<dc:creator>williamansley</dc:creator>
<guid isPermaLink="false">24921@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;@manzoorahmed: I would recommend against trying the methods given in this discussion; I doubt they would work now. since Machform has changed a lot in the last three to six years. If you want to redirect the user to one of several different web pages, based on the form input, you can now do this with the &#34;Logic Builder&#34;, using the &#34;Enable Rules to Display Success Page&#34; option, without modifying any code! If you need more help with this, please respond, and I'll do my best to supply more details.
&#60;/p&#62;</description>
</item>
<item>
<title>manzoorahmed on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-24915</link>
<pubDate>Thu, 25 Feb 2016 09:00:10 +0000</pubDate>
<dc:creator>manzoorahmed</dc:creator>
<guid isPermaLink="false">24915@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi, &#60;/p&#62;
&#60;p&#62;Is this code still valid for 4.5?&#60;br /&#62;
It doesn't seem to work for me.&#60;/p&#62;
&#60;p&#62;Regards,
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-16504</link>
<pubDate>Sun, 18 Nov 2012 19:53:17 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">16504@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;It should be located around line 876. Make sure to use text editor which has line numbers.
&#60;/p&#62;</description>
</item>
<item>
<title>aolmos on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-16491</link>
<pubDate>Fri, 16 Nov 2012 00:08:30 +0000</pubDate>
<dc:creator>aolmos</dc:creator>
<guid isPermaLink="false">16491@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi!&#60;br /&#62;
I use machform 2, and I can't locate that $process_result['error_elements'] = $error_elements; text in the post-functions.php file.  Please tell me how to do it in machform 2.  It is urgent! :-(&#60;/p&#62;
&#60;p&#62;Thank you
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5467</link>
<pubDate>Tue, 14 Apr 2009 18:38:15 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">5467@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Yes.. machform save form submission and form data to database.
&#60;/p&#62;</description>
</item>
<item>
<title>roguevoice on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5452</link>
<pubDate>Mon, 13 Apr 2009 19:27:17 +0000</pubDate>
<dc:creator>roguevoice</dc:creator>
<guid isPermaLink="false">5452@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Worked perfectly.  Thanks for the quick support.  Great product.  Is the data stored in a table to build HTML forms dynamically?
&#60;/p&#62;</description>
</item>
<item>
<title>roguevoice on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5451</link>
<pubDate>Mon, 13 Apr 2009 18:48:23 +0000</pubDate>
<dc:creator>roguevoice</dc:creator>
<guid isPermaLink="false">5451@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks.  Will try now and report back.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5450</link>
<pubDate>Mon, 13 Apr 2009 17:30:33 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">5450@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;If you have review page feature enabled, you should add some code in your &#34;post-functions.php&#34; again :) . To do so you need to update my previous code from :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 2)
{
	if ($table_data[&#38;#39;element_7_1&#38;#39;] == &#38;#39;1&#38;#39;) {
		//cancelation
		$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.cancel.com&#38;quot;;
	}
	else {
		if ($table_data[&#38;#39;element_5&#38;#39;] == &#38;#39;1&#38;#39;)
			$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.first.com&#38;quot;;
		elseif ($table_data[&#38;#39;element_5&#38;#39;] == &#38;#39;2&#38;#39;)
			$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.second.com&#38;quot;;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;to be like this&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;unset($_SESSION[&#38;#39;form_redirect&#38;#39;]);
if ($form_id == 2)
{
	if ($table_data[&#38;#39;element_17_1&#38;#39;] == &#38;#39;1&#38;#39;) {
		//cancelation
		$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.cancel.com&#38;quot;;
	}
	else {
		if ($table_data[&#38;#39;element_5&#38;#39;] == &#38;#39;1&#38;#39;)
			$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.first.com&#38;quot;;
		elseif ($table_data[&#38;#39;element_5&#38;#39;] == &#38;#39;2&#38;#39;)
			$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.second.com&#38;quot;;
	}
}

if (!empty($process_result[&#38;#39;form_redirect&#38;#39;]) &#38;#38;&#38;#38; $process_result[&#38;#39;form_redirect&#38;#39;] != &#38;#39;&#38;#39;) {
	$_SESSION[&#38;#39;form_redirect&#38;#39;] = $process_result[&#38;#39;form_redirect&#38;#39;];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;after that go to around line 2189, you will see this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$esr_plain_text	= $row[&#38;#39;esr_plain_text&#38;#39;];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;add this code exactly bellow that line :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if (!empty($_SESSION[&#38;#39;form_redirect&#38;#39;]))
	$form_redirect = $_SESSION[&#38;#39;form_redirect&#38;#39;];&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>roguevoice on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5449</link>
<pubDate>Sun, 12 Apr 2009 23:38:57 +0000</pubDate>
<dc:creator>roguevoice</dc:creator>
<guid isPermaLink="false">5449@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Tried the above, however it seems not to work with form review enabled.
&#60;/p&#62;</description>
</item>
<item>
<title>jflatham on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5192</link>
<pubDate>Wed, 25 Mar 2009 03:49:10 +0000</pubDate>
<dc:creator>jflatham</dc:creator>
<guid isPermaLink="false">5192@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I have completely tested the post-functions.php edits suggested by Redityo.  It worked like and absolute charm.  Thanks for all the great assistance!
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5175</link>
<pubDate>Tue, 24 Mar 2009 20:12:01 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">5175@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;You can put one of them, or any URL would do.
&#60;/p&#62;</description>
</item>
<item>
<title>jflatham on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5160</link>
<pubDate>Mon, 23 Mar 2009 23:57:16 +0000</pubDate>
<dc:creator>jflatham</dc:creator>
<guid isPermaLink="false">5160@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks bunches!  Last question: In the form properties for Form 2, for the redirect URL, should I leave it blank or just put in one of the actual URL's?
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5158</link>
<pubDate>Mon, 23 Mar 2009 20:58:17 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">5158@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;You'll have a number value from check box and radio buttons, anyway for conditional redirect it's possible by edit your &#34;post-functions.php&#34; file. Go to around line 876 and you will see this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$process_result[&#38;#39;error_elements&#38;#39;] = $error_elements;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can put these code bellow that line and since you've form id = 2, with radio button id = 5 and check box id = 7 so the code will be like this :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 2)
{
	if ($table_data[&#38;#39;element_7_1&#38;#39;] == &#38;#39;1&#38;#39;) {
		//cancelation
		$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.cancel.com&#38;quot;;
	}
	else {
		if ($table_data[&#38;#39;element_5&#38;#39;] == &#38;#39;1&#38;#39;)
			$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.first.com&#38;quot;;
		elseif ($table_data[&#38;#39;element_5&#38;#39;] == &#38;#39;2&#38;#39;)
			$process_result[&#38;#39;form_redirect&#38;#39;] = &#38;quot;http://www.second.com&#38;quot;;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Change the url with your requirement, I hope you can move to texas again with this :)
&#60;/p&#62;</description>
</item>
<item>
<title>jflatham on "Conditional redirect url"</title>
<link>https://www.machform.com/forums/topic/conditional-redirect-url#post-5136</link>
<pubDate>Sat, 21 Mar 2009 05:42:07 +0000</pubDate>
<dc:creator>jflatham</dc:creator>
<guid isPermaLink="false">5136@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I live in Texas, but have moved to the state of &#34;confusion.&#34; :-)&#60;/p&#62;
&#60;p&#62;I have a simple form containing several fields for facility reservation or cancellation.  &#60;a href=&#34;http://clearcreek13.org/testform_reservations02.php&#34; rel=&#34;nofollow&#34;&#62;http://clearcreek13.org/testform_reservations02.php&#60;/a&#62;  (form id=2)&#60;/p&#62;
&#60;p&#62;I have two radio buttons for facility choice and a check box for cancellation, among other data input.  Depending on the selection, I wish to redirect to one of 3 URL's, one for each facility reservation (without cancellation checked) and one for cancellations, regardless of facility.&#60;/p&#62;
&#60;p&#62;What confuses me is whether this requires redirection and passing varibles to a script to process the redirection further, or can this be accomplished though modifying post-functions.php, among other MachForm files.&#60;/p&#62;
&#60;p&#62;While we are on this subject, when passing variables from radio buttons and checkboxes, what &#34;values&#34; are actually passed: 1,2,null,true,false, etc?  In the case of 1 or 2, are these values integer or numbers or are they actually passed as text?&#60;/p&#62;
&#60;p&#62;Sorry for rambling!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
