<?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: How to reset hidden fields?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: How to reset hidden fields?</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 00:08:32 +0000</pubDate>

<item>
<title>Javo01 on "How to reset hidden fields?"</title>
<link>https://www.machform.com/forums/topic/how-to-reset-hidden-fields#post-18289</link>
<pubDate>Thu, 16 May 2013 00:33:08 +0000</pubDate>
<dc:creator>Javo01</dc:creator>
<guid isPermaLink="false">18289@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Actually I've made it by putting a dropdown without a default value and modifying the helper-functions.php a little bit around the line 1969 replacing this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($rule_show_hide == &#38;#39;show&#38;#39;){
				$action_code_primary 	= &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).show();&#38;quot;;
				$action_code_secondary  = &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).hide();&#38;quot;;
			}else if($rule_show_hide == &#38;#39;hide&#38;#39;){
				$action_code_primary 	= &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).hide();&#38;quot;;
				$action_code_secondary  = &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).show();&#38;quot;;
			}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;with this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($rule_show_hide == &#38;#39;show&#38;#39;){
				$action_code_primary 	= &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).show();&#38;quot;;
				$action_code_secondary  = &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).hide();&#38;quot;;

				$action_code_secondary  .= &#38;quot;\n\t\t\$(&#38;#39;#element_{$element_id}&#38;#39;).val(&#38;#39;&#38;#39;);&#38;quot;;
				$action_code_secondary  .= &#38;quot;\n\t\t\$(&#38;#39;#element_{$element_id}&#38;#39;).change();&#38;quot;;

			}else if($rule_show_hide == &#38;#39;hide&#38;#39;){
				$action_code_primary 	= &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).hide();&#38;quot;;
				$action_code_secondary  = &#38;quot;\$(&#38;#39;#li_{$element_id}&#38;#39;).show();&#38;quot;;

				$action_code_primary  .= &#38;quot;\n\t\t\$(&#38;#39;#element_{$element_id}&#38;#39;).val(&#38;#39;&#38;#39;);&#38;quot;;
				$action_code_primary  .= &#38;quot;\n\t\t\$(&#38;#39;#element_{$element_id}&#38;#39;).change();&#38;quot;;

			}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;that makes that when the payment field it's hided the values are erased and the total it's reset.&#60;/p&#62;
&#60;p&#62;IMPORTANT!&#60;/p&#62;
&#60;p&#62;This only will be useful if the form has only 1 payment field visible because the counter of the total price will completely reset each time the visible field it's hidden
&#60;/p&#62;</description>
</item>
<item>
<title>simonb on "How to reset hidden fields?"</title>
<link>https://www.machform.com/forums/topic/how-to-reset-hidden-fields#post-18258</link>
<pubDate>Mon, 13 May 2013 20:25:18 +0000</pubDate>
<dc:creator>simonb</dc:creator>
<guid isPermaLink="false">18258@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Yuniar has advised me that the total hidden price values won't calculate when the user hits submit&#60;br /&#62;
It only calculates all displayed values ( Tested by me and works )&#60;br /&#62;
So best case for now is either don't hide fields through logic etc or don't show running total.&#60;br /&#62;
Email total price is correct if the user hides the fields ( hidden fields are not added in email sent ).
&#60;/p&#62;</description>
</item>
<item>
<title>simonb on "How to reset hidden fields?"</title>
<link>https://www.machform.com/forums/topic/how-to-reset-hidden-fields#post-18208</link>
<pubDate>Mon, 06 May 2013 18:31:40 +0000</pubDate>
<dc:creator>simonb</dc:creator>
<guid isPermaLink="false">18208@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I ask again as I cannot fix this.&#60;/p&#62;
&#60;p&#62;I am using the Payment with Merchant set to Check/Cash with Variable Amount which I have set for each field.&#60;/p&#62;
&#60;p&#62;If a field is hidden ( to me at least) it should unload the values&#60;br /&#62;
( Or an option supplied in the admin panel to either say &#34;Unload Prices if hidden&#34; OR &#34;Keep Prices if hidden&#34; )&#60;/p&#62;
&#60;p&#62;Example:-&#60;/p&#62;
&#60;p&#62;Click on checkbox in the form  &#60;strong&#62;ADD MORE GOODS = No Yes&#60;/strong&#62;&#60;br /&#62;
User clicks Yes and it displays your hidden fields you want to show if &#60;strong&#62;YES&#60;/strong&#62; is checked ( Using Logic )&#60;/p&#62;
&#60;p&#62;It will then open 3 Check boxes which when each is clicked on, &#60;strong&#62;adds an amount&#60;/strong&#62; to your total.&#60;/p&#62;
&#60;p&#62;If they change their mind and select &#60;strong&#62;ADD MORE GOODS = NO&#60;/strong&#62; -  it will hide the field.&#60;/p&#62;
&#60;p&#62;If the field is hidden by the user the prices in those 3 fields &#60;strong&#62;should be subtracted from the total amount&#60;/strong&#62; as they think that hiding the fields will delete the added goods that they have clicked on.&#60;/p&#62;
&#60;p&#62;At the moment the values stay wether hidden or visible.&#60;/p&#62;
&#60;p&#62;So my question is&#60;/p&#62;
&#60;p&#62;How to &#60;strong&#62;unload PAYMENT&#60;/strong&#62; value when field is &#60;strong&#62;HIDDEN&#60;/strong&#62; if they change their mind.&#60;/p&#62;
&#60;p&#62;The Payment system as it is just won't work the way it is set now. ( &#60;strong&#62;Using hide/show fields&#60;/strong&#62; )&#60;/p&#62;
&#60;p&#62;Can someone let me know of a fix or help in anyway.&#60;/p&#62;
&#60;p&#62;Great software and the support is fantastic!&#60;br /&#62;
Gotta thank Yuniar for lightening response to a bug I found in the latest version.&#60;br /&#62;
Fixed within 24 hours. ( And on a Sunday )&#60;br /&#62;
Cheers
&#60;/p&#62;</description>
</item>
<item>
<title>simonb on "How to reset hidden fields?"</title>
<link>https://www.machform.com/forums/topic/how-to-reset-hidden-fields#post-18200</link>
<pubDate>Sun, 05 May 2013 13:19:31 +0000</pubDate>
<dc:creator>simonb</dc:creator>
<guid isPermaLink="false">18200@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I am having this same problem. Is there any way to unload the price if the field is hidden by the user?
&#60;/p&#62;</description>
</item>
<item>
<title>Javo01 on "How to reset hidden fields?"</title>
<link>https://www.machform.com/forums/topic/how-to-reset-hidden-fields#post-18058</link>
<pubDate>Fri, 19 Apr 2013 22:59:06 +0000</pubDate>
<dc:creator>Javo01</dc:creator>
<guid isPermaLink="false">18058@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi, I'm creating a Form with payments, it has four dropdown fields, only one of these is visible and they change his visibility selecting an option of four radio buttons, the problem is when one of the dropdowns are hidden and the user has already selected a value in it, the price that is assigned to that option in the  dropdown remains selected and it's added to the total plus the price of the option of the dropdown that is visible now&#60;/p&#62;
&#60;p&#62;So I'm looking for a way to reset the values of the hidden fields.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
