<?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: Checkboxes - php disable</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Checkboxes - php disable</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 22:56:54 +0000</pubDate>

<item>
<title>cyberground on "Checkboxes - php disable"</title>
<link>https://www.machform.com/forums/topic/checkboxes-php-disable#post-19830</link>
<pubDate>Mon, 16 Dec 2013 16:07:01 +0000</pubDate>
<dc:creator>cyberground</dc:creator>
<guid isPermaLink="false">19830@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I have the same problem, but my radiobuttons stand in relationship with different dates.&#60;/p&#62;
&#60;p&#62;You choose a date from calender and in cooparation with different relationship rules machform shows different radiobuttons.&#60;/p&#62;
&#60;p&#62;You can check this here: &#60;code&#62;a&#60;/code&#62;&#60;a href=&#34;http://www.klinikumdo.de/machform/view.php?id=5901&#34; rel=&#34;nofollow&#34;&#62;http://www.klinikumdo.de/machform/view.php?id=5901&#60;/a&#62;&#60;code&#62;a&#60;/code&#62;  for dates after 1th january 2014.&#60;/p&#62;
&#60;p&#62;I need a limit of 15 for each combination - is it possible? I Machform Version 3.4 Thanks a lot
&#60;/p&#62;</description>
</item>
<item>
<title>limelifephoto on "Checkboxes - php disable"</title>
<link>https://www.machform.com/forums/topic/checkboxes-php-disable#post-19644</link>
<pubDate>Wed, 13 Nov 2013 05:01:19 +0000</pubDate>
<dc:creator>limelifephoto</dc:creator>
<guid isPermaLink="false">19644@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Does anyone have a fix for this that works with 3.5?
&#60;/p&#62;</description>
</item>
<item>
<title>jfurtado on "Checkboxes - php disable"</title>
<link>https://www.machform.com/forums/topic/checkboxes-php-disable#post-16813</link>
<pubDate>Wed, 16 Jan 2013 23:17:04 +0000</pubDate>
<dc:creator>jfurtado</dc:creator>
<guid isPermaLink="false">16813@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Would this same concept apply for version 3.3? I need to disable an option once it reaches 16 users. I have a workshop sign up form, it lists a dozen workshops, but each can only host 16 participants.
&#60;/p&#62;</description>
</item>
<item>
<title>Juan on "Checkboxes - php disable"</title>
<link>https://www.machform.com/forums/topic/checkboxes-php-disable#post-13009</link>
<pubDate>Sun, 11 Dec 2011 23:01:17 +0000</pubDate>
<dc:creator>Juan</dc:creator>
<guid isPermaLink="false">13009@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;any idea?&#60;br /&#62;
thx
&#60;/p&#62;</description>
</item>
<item>
<title>Juan on "Checkboxes - php disable"</title>
<link>https://www.machform.com/forums/topic/checkboxes-php-disable#post-12978</link>
<pubDate>Tue, 06 Dec 2011 03:49:45 +0000</pubDate>
<dc:creator>Juan</dc:creator>
<guid isPermaLink="false">12978@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This is great. thx&#60;br /&#62;
How could i set a message that be displayed when client try to click on a checkbox with the maximum number of entries allowed? I mean when ($row['sum_1'] &#38;gt; 2 then disable checkbox and alert to user &#34;top number of entries has been reached!&#34;&#60;br /&#62;
Thank you very much and sorry for my english .... ;o)
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Checkboxes - php disable"</title>
<link>https://www.machform.com/forums/topic/checkboxes-php-disable#post-12608</link>
<pubDate>Wed, 21 Sep 2011 21:51:20 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">12608@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I think you're on the correct path, You can use java script code to disable the check box option. However, you can try the method from me :&#60;/p&#62;
&#60;p&#62;1. Edit &#34;includes/view-functions.php&#34; file and go to line 1831, you will see this text .&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//If you would like ......&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then put these code above that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 11) {

$query = &#38;quot;select
						sum(element_1_1) sum_1,
						sum(element_1_2) sum_2,
						sum(element_1_3) sum_3
				    from
				    	ap_form_{$form_id}&#38;quot;;

		$result = do_query($query);

		while($row = do_fetch_result($result)){
			if ($row[&#38;#39;sum_1&#38;#39;] &#38;gt; 2) { $disable_checkbox_1 = &#38;#39; $(&#38;quot;input#element_1_1&#38;quot;).attr(&#38;quot;disabled&#38;quot;, true); &#38;#39;; }
			if ($row[&#38;#39;sum_2&#38;#39;] &#38;gt; 2) { $disable_checkbox_2 = &#38;#39; $(&#38;quot;input#element_1_2&#38;quot;).attr(&#38;quot;disabled&#38;quot;, true); &#38;#39;; }
			if ($row[&#38;#39;sum_3&#38;#39;] &#38;gt; 2) { $disable_checkbox_3 = &#38;#39; $(&#38;quot;input#element_1_3&#38;quot;).attr(&#38;quot;disabled&#38;quot;, true); &#38;#39;; }
		}

$custom_js =&#38;lt;&#38;lt;&#38;lt;EOT
&#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 type=&#38;quot;text/javascript&#38;quot;&#38;gt;

$(document).ready(function() {
	{$disable_checkbox_1}
	{$disable_checkbox_2}
	{$disable_checkbox_3}
});

&#38;lt;/script&#38;gt;
EOT;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;2. Go to line 1871 for this code &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;{$calendar_js}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and change it to &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;{$custom_js}
{$calendar_js}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That would disable check box options, if it's selected more than 2. In there I assume your form id is 11 and the check box option is 1 (element_1_1,element_1_2,element_1_3).&#60;/p&#62;
&#60;p&#62;You need to change those id with yours.
&#60;/p&#62;</description>
</item>
<item>
<title>tobyp on "Checkboxes - php disable"</title>
<link>https://www.machform.com/forums/topic/checkboxes-php-disable#post-12604</link>
<pubDate>Tue, 20 Sep 2011 11:37:44 +0000</pubDate>
<dc:creator>tobyp</dc:creator>
<guid isPermaLink="false">12604@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi &#60;/p&#62;
&#60;p&#62;I'm using Machforms to create a booking system for a one day event with three sessions and a limited amount of places available for each session submitted from one form using a checkbox &#60;/p&#62;
&#60;p&#62;Checkbox1 - session1 - 9-12pm&#60;br /&#62;
Checkbox2 - session2 - 12-1pm&#60;br /&#62;
Checkbox2 - session3 - 1-5pm&#60;/p&#62;
&#60;p&#62;The client wants the checkboxes to be disabled as and when each individual session is booked out.&#60;/p&#62;
&#60;p&#62;Not being a programmer I've achieved it by using this db query on the php page that i have my embed code for the form .&#60;/p&#62;
&#60;p&#62;Then I've used a Javascript function to disable it and change the class on the label. This works ok but it's not ideal as it's clientside, is there anyway to do this with PHP?&#60;/p&#62;
&#60;p&#62;Thanks for your help.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$query = &#34;SELECT COUNT(element_5_1) AS element_5_11 FROM ap_form_2&#60;br /&#62;
WHERE element_5_1='1' &#34;;&#60;br /&#62;
$result = do_query($query);&#60;br /&#62;
$row = do_fetch_result($result);&#60;br /&#62;
if ($row[0] &#38;gt;= 10) {&#60;br /&#62;
		echo 'there are equal or more than 10 entries in 9am-12pm';&#60;br /&#62;
		echo '&#38;lt;script type=&#34;text/javascript&#34;&#38;gt;disableCbx1()&#38;lt;/script&#38;gt;';&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;</description>
</item>

</channel>
</rss>
