<?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: checkbox to open a second address field</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: checkbox to open a second address field</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 00:09:00 +0000</pubDate>

<item>
<title>yuniar on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-16015</link>
<pubDate>Mon, 24 Sep 2012 13:36:20 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">16015@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;oliver -- can you let me know the URL of your form please? Or contact us directly if you don't want to post it here.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.appnitro.com/contact&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/contact&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>oliver on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-16006</link>
<pubDate>Fri, 21 Sep 2012 13:42:38 +0000</pubDate>
<dc:creator>oliver</dc:creator>
<guid isPermaLink="false">16006@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Yuniar,&#60;/p&#62;
&#60;p&#62;Good day.&#60;/p&#62;
&#60;p&#62;I need some help.&#60;/p&#62;
&#60;p&#62;I'm having problem with my form where i apply similar function like what Freddy did in his form but i used radio button instead of check-box.&#60;/p&#62;
&#60;p&#62;I have a radio field saying &#34;With clinic?&#34; and the radio field have 2 option: Yes and No,&#60;br /&#62;
If you select option: yes, 3 text fields(tel no. 1, Tel. no. 2, Fax no.) will show up and if you choose option: No, 1 field will show-up (Default Tel. No.)&#60;/p&#62;
&#60;p&#62;Here is my Code:&#60;/p&#62;
&#60;p&#62;&#38;lt;script&#38;gt;&#60;br /&#62;
$(document).ready(function(){&#60;br /&#62;
  $(&#34;input[name$='element_24']&#34;).click(function(){&#60;br /&#62;
  var value = $(this).val();&#60;br /&#62;
  if(value=='1') {&#60;br /&#62;
	$('#li_3').show();&#60;br /&#62;
	$('#li_4').show();&#60;br /&#62;
	$('#li_5').show();&#60;br /&#62;
	$('#li_6').show();&#60;br /&#62;
	$('#li_25').hide();&#60;br /&#62;
  }&#60;br /&#62;
  else if(value=='2') {&#60;br /&#62;
	$('#li_25').show();&#60;br /&#62;
	$('#li_3').hide();&#60;br /&#62;
	$('#li_4').hide();&#60;br /&#62;
	$('#li_5').hide();&#60;br /&#62;
	$('#li_6').hide();&#60;br /&#62;
   }&#60;br /&#62;
  });&#60;br /&#62;
	$('#li_3').hide();&#60;br /&#62;
	$('#li_4').hide();&#60;br /&#62;
	$('#li_5').hide();&#60;br /&#62;
	$('#li_6').hide();&#60;br /&#62;
	$('#li_25').hide();&#60;br /&#62;
});&#60;br /&#62;
&#38;lt;/script&#38;gt;&#60;/p&#62;
&#60;p&#62;Now, here the problem: The yes and no part is working but When i click the other fields like 'name', 'department' and others, it shows the hidden fields.&#60;/p&#62;
&#60;p&#62;I've been trying to solve the problem but still no luck.&#60;/p&#62;
&#60;p&#62;Hope you can help.&#60;/p&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
</item>
<item>
<title>jpello on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-13459</link>
<pubDate>Sat, 04 Feb 2012 05:14:27 +0000</pubDate>
<dc:creator>jpello</dc:creator>
<guid isPermaLink="false">13459@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Can this same code be used to add a field if a dropdown selection is selected?&#60;/p&#62;
&#60;p&#62;I.E.&#60;/p&#62;
&#60;p&#62;Do you play Golf?&#60;/p&#62;
&#60;p&#62;If Yes, show a text box where they put their handicap&#60;/p&#62;
&#60;p&#62;If No, do nothing
&#60;/p&#62;</description>
</item>
<item>
<title>Radices on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-11626</link>
<pubDate>Thu, 17 Mar 2011 22:08:33 +0000</pubDate>
<dc:creator>Radices</dc:creator>
<guid isPermaLink="false">11626@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Ok thanks for the speedy reply.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-11624</link>
<pubDate>Thu, 17 Mar 2011 21:32:36 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11624@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I'm afraid setting the &#34;required&#34; rule for a field based on a checkbox won't be quite easy to do, since this would involve server side interaction, not just a simple javascript.&#60;/p&#62;
&#60;p&#62;Basically, you will need to do some ajax call when the checkbox being selected and the ajax need to modify the &#34;required&#34; value of the field.&#60;/p&#62;
&#60;p&#62;We won't be able to provide you with the code for this. Sorry.
&#60;/p&#62;</description>
</item>
<item>
<title>Radices on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-11615</link>
<pubDate>Thu, 17 Mar 2011 02:37:54 +0000</pubDate>
<dc:creator>Radices</dc:creator>
<guid isPermaLink="false">11615@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I'm looking to make a field mandatory based on a check box selection. I have 3 check boxes&#60;br /&#62;
and if any one of them is clicked I'd like to make the phone number field mandatory.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.home-search-the-easy-way.ca/view.php?id=3&#34; rel=&#34;nofollow&#34;&#62;http://www.home-search-the-easy-way.ca/view.php?id=3&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>anderfelix on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-10534</link>
<pubDate>Thu, 23 Sep 2010 16:07:34 +0000</pubDate>
<dc:creator>anderfelix</dc:creator>
<guid isPermaLink="false">10534@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi there … it all works great.&#60;br /&#62;
But is it possible to show/hide a field that is required?&#60;/p&#62;
&#60;p&#62;If i do it the way you show, i cant send the form if the adressfield is hidden (set to display:none)&#60;/p&#62;
&#60;p&#62;But in my case i need the adressfield to be required if shown. is it possible?
&#60;/p&#62;</description>
</item>
<item>
<title>jamespeck on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-9201</link>
<pubDate>Thu, 15 Apr 2010 12:30:16 +0000</pubDate>
<dc:creator>jamespeck</dc:creator>
<guid isPermaLink="false">9201@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Tried the head of the webpage and that works great. Thank you!
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-9193</link>
<pubDate>Wed, 14 Apr 2010 17:37:43 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">9193@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;To apply the code using the advanced code, you need to modify another line.&#60;br /&#62;
Edit your &#34;includes/view-functions.php&#34; file and search around line 2171.&#60;/p&#62;
&#60;p&#62;Add the same code as above.&#60;/p&#62;
&#60;p&#62;Or yes, you can also put the script into the head of the webpage.
&#60;/p&#62;</description>
</item>
<item>
<title>jamespeck on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-9188</link>
<pubDate>Wed, 14 Apr 2010 15:31:08 +0000</pubDate>
<dc:creator>jamespeck</dc:creator>
<guid isPermaLink="false">9188@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Just a thought - would it be possible to put a similar script in the head of the webpage, so as the php delivery method works?
&#60;/p&#62;</description>
</item>
<item>
<title>jamespeck on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-9182</link>
<pubDate>Tue, 13 Apr 2010 14:54:36 +0000</pubDate>
<dc:creator>jamespeck</dc:creator>
<guid isPermaLink="false">9182@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This method seems to work well with the standard iframe methodology, but doesn't work with the advanced code option.&#60;/p&#62;
&#60;p&#62;Is there a solution that works for the advanced code?&#60;/p&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-8381</link>
<pubDate>Wed, 13 Jan 2010 13:31:34 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">8381@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;You can remove these line to make the field displayed when the form loaded&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$(&#38;#39;#li_27&#38;#39;).css(&#38;#39;display&#38;#39;,&#38;#39;none&#38;#39;);
	$(&#38;#39;#li_28&#38;#39;).css(&#38;#39;display&#38;#39;,&#38;#39;none&#38;#39;);
	$(&#38;#39;#li_29&#38;#39;).css(&#38;#39;display&#38;#39;,&#38;#39;none&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And to use the script on specific form, you can use the method in here :&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.appnitro.com/forums/topic/showhide-question?replies=2&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forums/topic/showhide-question?replies=2&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>tania on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-8378</link>
<pubDate>Wed, 13 Jan 2010 08:11:23 +0000</pubDate>
<dc:creator>tania</dc:creator>
<guid isPermaLink="false">8378@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Scratch the above question - that is what Redityo answered.  However, I have another question, how do you make the above javascript pertain to one form and not all?&#60;br /&#62;
Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>tania on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-8262</link>
<pubDate>Sat, 02 Jan 2010 08:12:23 +0000</pubDate>
<dc:creator>tania</dc:creator>
<guid isPermaLink="false">8262@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I would like to do something very similar, but opposite, meaning --&#38;gt; based on a checkbox I want hide fields rather than have then show.  Is this possible?  For example, I have a form and they can check the box &#34;reschedule&#34; -- when they check it I want some elements to hide.&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-5572</link>
<pubDate>Thu, 23 Apr 2009 10:46:00 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">5572@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Yes it's possible, try with this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script&#38;gt;
	$(document).ready(function(){
			$(&#38;#39;#li_27&#38;#39;).css(&#38;#39;display&#38;#39;,&#38;#39;none&#38;#39;);
			$(&#38;#39;#li_28&#38;#39;).css(&#38;#39;display&#38;#39;,&#38;#39;none&#38;#39;);
			$(&#38;#39;#li_29&#38;#39;).css(&#38;#39;display&#38;#39;,&#38;#39;none&#38;#39;);
			$(&#38;#39;#element_32_1&#38;#39;).click(function(){
				$(&#38;#39;#li_27&#38;#39;).toggle();
				$(&#38;#39;#li_28&#38;#39;).toggle();
				$(&#38;#39;#li_29&#38;#39;).toggle();
			});
	});
&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Jacy1001 on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-5562</link>
<pubDate>Wed, 22 Apr 2009 21:25:44 +0000</pubDate>
<dc:creator>Jacy1001</dc:creator>
<guid isPermaLink="false">5562@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I've tried this option and it works great.&#60;br /&#62;
Now my question is:&#60;br /&#62;
Is it possible to hide and reveal more lines.&#60;br /&#62;
I've got element_32_1 (the ceckbox)&#60;br /&#62;
and the lines li_27, li_28, li_29 to hide.&#60;br /&#62;
How would the code look like&#60;/p&#62;
&#60;p&#62;thanks in advance
&#60;/p&#62;</description>
</item>
<item>
<title>Freddy on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-4490</link>
<pubDate>Sat, 31 Jan 2009 00:44:10 +0000</pubDate>
<dc:creator>Freddy</dc:creator>
<guid isPermaLink="false">4490@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;That worked great man! I thought i wouldn´t get a reply because of being an hard request :)&#60;/p&#62;
&#60;p&#62;Thank you for your brilliant script and amazing support.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-4483</link>
<pubDate>Fri, 30 Jan 2009 19:22:41 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">4483@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Ok first you'll need to add a single checkbox and the address field which you would like to hide/show.&#60;/p&#62;
&#60;p&#62;After adding them, view the HTML source of your form and get the id for those fields.&#60;br /&#62;
Let say you have the following:&#60;/p&#62;
&#60;p&#62;checkbox --&#38;gt; id = element_3_1&#60;br /&#62;
address  --&#38;gt; id = li_2&#60;/p&#62;
&#60;p&#62;Edit your &#60;strong&#62;includes/view-functions.php&#60;/strong&#62; file, around line 1831 you should see this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;js/view.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;right below that line, add this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot; src=&#38;quot;js/jquery/jquery-core.js&#38;quot;&#38;gt;&#38;lt;/script&#38;gt;
&#38;lt;script&#38;gt;
	$(document).ready(function(){
			$(&#38;#39;#li_2&#38;#39;).css(&#38;#39;display&#38;#39;,&#38;#39;none&#38;#39;);
			$(&#38;#39;#element_3_1&#38;#39;).click(function(){
				$(&#38;#39;#li_2&#38;#39;).toggle();
			});
	});
&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;that would toggle your address field based on the checkbox.&#60;/p&#62;
&#60;p&#62;Make sure to adjust the above code with your own ids.
&#60;/p&#62;</description>
</item>
<item>
<title>Freddy on "checkbox to open a second address field"</title>
<link>https://www.machform.com/forums/topic/checkbox-to-open-a-second-address-field#post-4455</link>
<pubDate>Thu, 29 Jan 2009 01:11:16 +0000</pubDate>
<dc:creator>Freddy</dc:creator>
<guid isPermaLink="false">4455@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I need some help.&#60;/p&#62;
&#60;p&#62;On my form i have the address field called Return address.&#60;br /&#62;
I would like to have a checkbox saying¨Use alternative address for pickup of goods.&#60;/p&#62;
&#60;p&#62;When they check the checkbox a brand new address field should just slide or popup side by side with the other one so that the customr could fill in a second address.&#60;/p&#62;
&#60;p&#62;How would i go to achieve this?&#60;/p&#62;
&#60;p&#62;I'm a beginner with PHP and the reason i bought Machform was because it´s so simple :)&#60;br /&#62;
but can be a quite difficult if you want to add extra stuff.&#60;/p&#62;
&#60;p&#62;Hope anyone can help me :)
&#60;/p&#62;</description>
</item>

</channel>
</rss>
