<?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: Dynamic redirect URL after submission</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Dynamic redirect URL after submission</description>
<language>en</language>
<pubDate>Wed, 10 Jun 2026 02:58:14 +0000</pubDate>

<item>
<title>jhinkle on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11511</link>
<pubDate>Wed, 02 Mar 2011 21:58:55 +0000</pubDate>
<dc:creator>jhinkle</dc:creator>
<guid isPermaLink="false">11511@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Removing _POST when referencing the checkboxes fixed both of my problems ... Thanks Redityo!
&#60;/p&#62;</description>
</item>
<item>
<title>jhinkle on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11504</link>
<pubDate>Wed, 02 Mar 2011 04:07:25 +0000</pubDate>
<dc:creator>jhinkle</dc:creator>
<guid isPermaLink="false">11504@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I even tried to complete the form without the review page, and it still wouldn't build the URL properly.
&#60;/p&#62;</description>
</item>
<item>
<title>jhinkle on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11503</link>
<pubDate>Wed, 02 Mar 2011 03:56:02 +0000</pubDate>
<dc:creator>jhinkle</dc:creator>
<guid isPermaLink="false">11503@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I might have to send you my post-function.php file, because not only does my URL not build, but now it doesn't properly show the review page correctly.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11499</link>
<pubDate>Sun, 27 Feb 2011 21:39:59 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11499@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Ah.. yes, you need to do one more thing.&#60;/p&#62;
&#60;p&#62;Edit your post-functions.php file, search around line 1241 for this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;return $process_result;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;change it to become:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$_SESSION[&#38;#39;table_data&#38;#39;] = $table_data;
return $process_result;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then adjust your current code to be like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$table_data = $_SESSION[&#38;#39;table_data&#38;#39;];

if ($form_id == 4 ) {
$productID = 46;
// Mens Shirts
if (!empty($table_data[&#38;#39;element_34_1&#38;#39;])){
$productID = $productID . &#38;#39;,44{1}1&#38;#39;;
}
if (!empty($table_data[&#38;#39;element_34_2&#38;#39;])){
$productID = $productID . &#38;#39;,44{1}2&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>jhinkle on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11495</link>
<pubDate>Fri, 25 Feb 2011 23:38:45 +0000</pubDate>
<dc:creator>jhinkle</dc:creator>
<guid isPermaLink="false">11495@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Adding the session variable fixed my problem, thanks! But now I'm running into a problem with the URL not building properly. Even though I have checked some checkboxes on my form, it's not appending my &#34;productID&#34; to the string variable (which in turn, appends to the redirect URL). Can you double check to see if I'm coding it correctly:&#60;/p&#62;
&#60;p&#62;if ($form_id == 4 ) {&#60;br /&#62;
	$productID = 46;&#60;br /&#62;
	// Mens Shirts&#60;br /&#62;
	if (!empty($_POST[$table_data['element_34_1']])){&#60;br /&#62;
		$productID = $productID . ',44{1}1';&#60;br /&#62;
	}&#60;br /&#62;
	if (!empty($_POST[$table_data['element_34_2']])){&#60;br /&#62;
		$productID = $productID . ',44{1}2';&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;The only &#34;productID&#34; that is appended to the redirect URL is &#34;46&#34; - the default value as seen above.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11492</link>
<pubDate>Fri, 25 Feb 2011 19:42:06 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11492@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Ah.. I see. Most likely redityo was assuming that &#34;form review&#34; wasn't enabled.&#60;br /&#62;
The code above only work when you have form review turned off.&#60;/p&#62;
&#60;p&#62;If you have form review, you need to follow exactly like this post:&#60;br /&#62;
&#60;a href=&#34;http://www.appnitro.com/forums/topic/custom-action-url-and-usage-field-data?replies=16#post-5246&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forums/topic/custom-action-url-and-usage-field-data?replies=16#post-5246&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>jhinkle on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11476</link>
<pubDate>Thu, 24 Feb 2011 21:46:18 +0000</pubDate>
<dc:creator>jhinkle</dc:creator>
<guid isPermaLink="false">11476@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Redityo told me to put it after line 915&#60;/p&#62;
&#60;p&#62;Yes, I have &#34;form review&#34; enabled on this form.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11474</link>
<pubDate>Thu, 24 Feb 2011 20:48:19 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11474@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Can you let me know at what line number exactly you put the code above? There are similar codes on some different lines, this might be the cause.&#60;/p&#62;
&#60;p&#62;Also, do you have &#34;form review&#34; enabled on your form?
&#60;/p&#62;</description>
</item>
<item>
<title>jhinkle on "Dynamic redirect URL after submission"</title>
<link>https://www.machform.com/forums/topic/dynamic-redirect-url-after-submission#post-11470</link>
<pubDate>Thu, 24 Feb 2011 03:06:09 +0000</pubDate>
<dc:creator>jhinkle</dc:creator>
<guid isPermaLink="false">11470@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I'm building a redirect URL string after the submission of the form and need help as to where it goes.&#60;/p&#62;
&#60;p&#62;I tried putting it in the post-functions.php file after the below lines of code:&#60;/p&#62;
&#60;p&#62;$process_result['form_redirect']  = $form_redirect;&#60;br /&#62;
$process_result['old_values'] 	  = $form_data;&#60;br /&#62;
$process_result['error_elements'] = $error_elements;&#60;/p&#62;
&#60;p&#62;I tested it and it seems to just be going to the text &#34;Success! Your submission has been saved!&#34;&#60;/p&#62;
&#60;p&#62;Below is my code that dynamically builds the redirect URL:&#60;/p&#62;
&#60;p&#62;if ($form_id == 4 ) {&#60;br /&#62;
	$productID = 46;&#60;/p&#62;
&#60;p&#62;	if (!empty($_POST[$table_data['element_34_1']])){&#60;br /&#62;
		$productsID = $productID . ',44{1}';&#60;br /&#62;
	}&#60;br /&#62;
	if (!empty($_POST[$table_data['element_34_2']])){&#60;br /&#62;
		$productsID = $productID . ',44{2}';&#60;br /&#62;
	}&#60;br /&#62;
.&#60;br /&#62;
.&#60;br /&#62;
.&#60;/p&#62;
&#60;p&#62;	$process_result['form_redirect'] = &#34;http://www.yourdomain.com/catalog/addproducts.php?product_id=&#34; . $productsID;&#60;br /&#62;
}
&#60;/p&#62;</description>
</item>

</channel>
</rss>
