<?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: Require 2 of 5 multiple choice answers</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Require 2 of 5 multiple choice answers</description>
<language>en</language>
<pubDate>Wed, 06 May 2026 16:02:57 +0000</pubDate>

<item>
<title>chriskoeling on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-18515</link>
<pubDate>Thu, 13 Jun 2013 13:16:23 +0000</pubDate>
<dc:creator>chriskoeling</dc:creator>
<guid isPermaLink="false">18515@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I see that is also a good solution: &#60;a href=&#34;http://www.appnitro.com/forums/topic/limiting-checkbox-choices&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forums/topic/limiting-checkbox-choices&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>chriskoeling on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-18514</link>
<pubDate>Thu, 13 Jun 2013 13:14:22 +0000</pubDate>
<dc:creator>chriskoeling</dc:creator>
<guid isPermaLink="false">18514@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Can someone tell me if this is still actual. I can imagine this will be an option in a new release?
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-12428</link>
<pubDate>Fri, 05 Aug 2011 21:17:03 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">12428@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;can you send us your modified file and let us know the URL to your form please?&#60;br /&#62;
We'll check it.&#60;/p&#62;
&#60;p&#62;You can send it via email: customer.service [at] appnitro.com
&#60;/p&#62;</description>
</item>
<item>
<title>delvalcollege on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-12424</link>
<pubDate>Fri, 05 Aug 2011 00:03:54 +0000</pubDate>
<dc:creator>delvalcollege</dc:creator>
<guid isPermaLink="false">12424@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This is not working for me. I changed the element ID and form ID. The error message defaults to the &#34;required&#34; message, and when I select only one of the checkboxes, it still throws an error. Has something changed since this was posted?
&#60;/p&#62;</description>
</item>
<item>
<title>pbadcock on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-8059</link>
<pubDate>Fri, 27 Nov 2009 18:22:03 +0000</pubDate>
<dc:creator>pbadcock</dc:creator>
<guid isPermaLink="false">8059@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;That sorted it, the fault was my end. Thanks very much for your help, sorry to trouble you.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-8055</link>
<pubDate>Fri, 27 Nov 2009 11:04:32 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">8055@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Peter,&#60;/p&#62;
&#60;p&#62;From the error message :&#60;/p&#62;
&#60;p&#62;Error sending email: SMTP Error: The following recipients failed: {element_2}&#60;/p&#62;
&#60;p&#62;It seems the problem come from your mail setting. To fix it, try to re-set form mail setting and then try to submit the form again.&#60;/p&#62;
&#60;p&#62;Anyway if you restore the file to original state, will it solve the problem ? I think the problem not come from this customization
&#60;/p&#62;</description>
</item>
<item>
<title>pbadcock on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-8051</link>
<pubDate>Fri, 27 Nov 2009 00:59:07 +0000</pubDate>
<dc:creator>pbadcock</dc:creator>
<guid isPermaLink="false">8051@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I've just tried this and the validation works fine, but when I correct and submit the form I get this message:&#60;/p&#62;
&#60;p&#62;Error sending email: SMTP Error: The following recipients failed: {element_2}&#60;br /&#62;
Warning: Cannot modify header information - headers already sent by (output started at /home/ihbconli/public_html/machnew/machform2/includes/helper-functions.php:482) in /home/ihbconli/public_html/machnew/machform2/confirm.php on line 38&#60;/p&#62;
&#60;p&#62;However, the form submission is sent successfully, but the error message would put most users off.&#60;/p&#62;
&#60;p&#62;The same form sent fine before I did the alterations. I get the same error message if I attempt to send the form with the correct number of boxes ticked, if that helps.&#60;/p&#62;
&#60;p&#62;Can anyone help? I would love to use this addition,&#60;/p&#62;
&#60;p&#62;Peter
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-7367</link>
<pubDate>Sun, 20 Sep 2009 12:31:18 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">7367@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Multiple selection in &#34;multiple choice&#34; field it not possible, however you can use a &#34;check box fiald&#34; and add a custom validation to the field, so your user will allowed to fill 2 options. To do so, you need to edit &#34;includes/post-functions.php&#34; file, go to around line 614 ~ 624 you'll see these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;foreach ($all_child_array as $i){

	//save old data into array, for form redisplay in case errors occured
	$form_data[$base_element_name.$i][&#38;#39;default_value&#38;#39;]   = $user_input[$base_element_name.$i];

	//prepare data for table column
	$table_data[$base_element_name.$i] = $user_input[$base_element_name.$i];

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then replace the code with this &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$count_value = 0;
foreach ($all_child_array as $i){

	//save old data into array, for form redisplay in case errors occured
	$form_data[$base_element_name.$i][&#38;#39;default_value&#38;#39;]   = $user_input[$base_element_name.$i];

	//prepare data for table column
	$table_data[$base_element_name.$i] = $user_input[$base_element_name.$i];
	if ($user_input[$base_element_name.$i] != &#38;#39;&#38;#39; or !empty($user_input[$base_element_name.$i])) {
		$count_value++;
	}
}

if ($count_value &#38;lt;&#38;gt; 2) {
	if ($form_id == 5 &#38;#38;&#38;#38; $element_id == 1)
		$error_elements[$element_id] = &#38;#39;You only need to choose 2 options&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;in there I assume you've the field with element id 1 in form id 5, so you need to change those ID with yours
&#60;/p&#62;</description>
</item>
<item>
<title>kflynn on "Require 2 of 5 multiple choice answers"</title>
<link>https://www.machform.com/forums/topic/require-2-of-5-multiple-choice-answers#post-7361</link>
<pubDate>Sat, 19 Sep 2009 18:01:16 +0000</pubDate>
<dc:creator>kflynn</dc:creator>
<guid isPermaLink="false">7361@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I've searched throught the forums a bit but can't find any info. I have a 5 choices in a multiple choice entry. I need the use to be able to select any two multiple choice answers&#60;/p&#62;
&#60;p&#62;Is this possible? I know I can use checkboxes but a user can then tick as many as they like.&#60;/p&#62;
&#60;p&#62;Any help greatly appreciated.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
