<?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: Customization and derived form data</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Customization and derived form data</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 23:06:07 +0000</pubDate>

<item>
<title>timothykrulan on "Customization and derived form data"</title>
<link>https://www.machform.com/forums/topic/customization-and-derived-form-data#post-16499</link>
<pubDate>Sat, 17 Nov 2012 02:40:57 +0000</pubDate>
<dc:creator>timothykrulan</dc:creator>
<guid isPermaLink="false">16499@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks - this worked.   Now I can check which form is being processed and create calculated data based on the form.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Customization and derived form data"</title>
<link>https://www.machform.com/forums/topic/customization-and-derived-form-data#post-16485</link>
<pubDate>Thu, 15 Nov 2012 18:11:51 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">16485@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;You can check the value of &#60;strong&#62;$form_id&#60;/strong&#62; variable. It contain the ID number of your form.&#60;/p&#62;
&#60;p&#62;You can override/set the value of the guidelines by modifying the view-functions.php file, around line 4098:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$element[$j]-&#38;gt;guidelines = $row[&#38;#39;element_guidelines&#38;#39;];&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>timothykrulan on "Customization and derived form data"</title>
<link>https://www.machform.com/forums/topic/customization-and-derived-form-data#post-16476</link>
<pubDate>Thu, 15 Nov 2012 03:14:17 +0000</pubDate>
<dc:creator>timothykrulan</dc:creator>
<guid isPermaLink="false">16476@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;New Questions:&#60;/p&#62;
&#60;p&#62;How do you know which form you are processing within the PHP code of post-functions.php so the derived fields only work on the forms I want them to?&#60;br /&#62;
Can you set the value of &#34;Guidelines for User&#34; in a Section Break via PHP like you can the value of an element?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>timothykrulan on "Customization and derived form data"</title>
<link>https://www.machform.com/forums/topic/customization-and-derived-form-data#post-16475</link>
<pubDate>Thu, 15 Nov 2012 03:13:02 +0000</pubDate>
<dc:creator>timothykrulan</dc:creator>
<guid isPermaLink="false">16475@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Follow up&#60;br /&#62;
Solved: How do you know what &#34;element&#34; # is which field? Use View Source in browser.&#60;br /&#62;
Solved: How do you create a &#34;hidden&#34; field that is not shown on the input form but is on the review page? Use &#34;hidden&#34; in custom CSS&#60;br /&#62;
Solved:How can you determin which item on a line is selected in a matrix choice?  Element value is set to the column user selects
&#60;/p&#62;</description>
</item>
<item>
<title>timothykrulan on "Customization and derived form data"</title>
<link>https://www.machform.com/forums/topic/customization-and-derived-form-data#post-16474</link>
<pubDate>Thu, 15 Nov 2012 02:00:56 +0000</pubDate>
<dc:creator>timothykrulan</dc:creator>
<guid isPermaLink="false">16474@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I really need to get something like this working so a few questions - sorry if these are basic.&#60;/p&#62;
&#60;p&#62;How do you know what &#34;element&#34; # is which field?&#60;br /&#62;
How do you create a &#34;hidden&#34; field that is not shown on the input form but is on the review page?&#60;/p&#62;
&#60;p&#62;How can you determin which item on a line is selected in a matrix choice?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>christopherbrooks on "Customization and derived form data"</title>
<link>https://www.machform.com/forums/topic/customization-and-derived-form-data#post-15996</link>
<pubDate>Thu, 20 Sep 2012 07:47:04 +0000</pubDate>
<dc:creator>christopherbrooks</dc:creator>
<guid isPermaLink="false">15996@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;For those who need custom logic to derive fields from a combination of user input fields, this is quite feasible. Appnitro provided outstanding support to me so I could add this to my forms, and I share it for the benefit of all.&#60;/p&#62;
&#60;p&#62;Background:&#60;br /&#62;
My form collects user input for many selections -- check boxes and number counts mainly. My need was to calculate a total fee, which is based on a combination of things selected, not simply a one-price-per-item. I also wanted to show the total fee to the user on the review page. I am running version 3.3.&#60;/p&#62;
&#60;p&#62;Solution:&#60;br /&#62;
The customization takes place in post-functions.php. About line 320, immediately before&#60;br /&#62;
		&#60;code&#62;//pick user input&#60;/code&#62;&#60;br /&#62;
add this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/** Initialize input from session **/
		$temp_input = $input;
		unset($temp_input[&#38;#39;form_id&#38;#39;]);
		unset($temp_input[&#38;#39;submit_form&#38;#39;]);
		unset($temp_input[&#38;#39;page_number&#38;#39;]);
		unset($temp_input[&#38;#39;submit_primary&#38;#39;]);
		unset($temp_input[&#38;#39;submit_secondary&#38;#39;]);

		foreach ($element_to_get as $el_name) {
			$key_temp = array();
			$key_temp = explode(&#38;quot;_&#38;quot;,$el_name);
			if(count($key_temp) &#38;gt;= 3){
            	if(!empty($_SESSION[&#38;#39;all_page_input_&#38;#39;.$form_id][$el_name]) &#38;#38;&#38;#38; empty($input[$el_name])){
					unset($_SESSION[&#38;#39;all_page_input_&#38;#39;.$form_id][$el_name]);
				}
			}
        }

		$_SESSION[&#38;#39;all_page_input_&#38;#39;.$form_id] = (array) array_merge((array) $_SESSION[&#38;#39;all_page_input_&#38;#39;.$form_id],$temp_input);
		$input = array_merge($input,$_SESSION[&#38;#39;all_page_input_&#38;#39;.$form_id]);
		/** end initialization **/&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Follow this with your own custom code to derive data based on the user input. You can refer to any of your form's fields and base your calculations and logic on whatever value (numbers, check boxes, radio buttons, etc) the user has supplied.   For example:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$lunchfee = (int) $input[&#38;#39;element_29&#38;#39;] * $satlunchfee +
$input[&#38;#39;element_38&#38;#39;] * $sunlunchfee ;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;When your calculations are complete, you can push the results into one or more hidden fields -- not shown on the input form , but visible on the review page:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$input[&#38;#39;element_60&#38;#39;] = strval($PartAFeeTot) ;
$input[&#38;#39;element_61&#38;#39;] = strval($PartBFeeTot) ;
$input[&#38;#39;element_62&#38;#39;] = strval($PartAFeeTot + $PartBFeeTot);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Your calculations are totally behind the scenes, but you can make results appear on the review page and thus become part of the submitted form.&#60;/p&#62;
&#60;p&#62;My compliments to Appnitro for a terrific software package and excellent support.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
