<?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: Limit Entries per Field</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Limit Entries per Field</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 01:30:07 +0000</pubDate>

<item>
<title>jfurtado on "Limit Entries per Field"</title>
<link>https://www.machform.com/forums/topic/limit-entries-per-field#post-21070</link>
<pubDate>Mon, 19 May 2014 20:25:14 +0000</pubDate>
<dc:creator>jfurtado</dc:creator>
<guid isPermaLink="false">21070@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;&#60;code&#62;&#60;br /&#62;
function mf_display_raw_form($dbh,$form_id) {&#60;/p&#62;
&#60;p&#62;	global $mf_lang;&#60;/p&#62;
&#60;p&#62;	if ($form_id == 31310) {&#60;/p&#62;
&#60;p&#62;		$query = &#34;SELECT element_6, count(*) as signedUp2&#60;br /&#62;
		FROM ap_form_{$form_id} GROUP BY element_6 ASC&#34;;&#60;br /&#62;
		$result = mf_do_query($query,$params,$dbh);&#60;/p&#62;
&#60;p&#62;		while($row = mf_do_fetch_result($result)){&#60;br /&#62;
			$el_disable_array = array();&#60;br /&#62;
			foreach ($row as $key =&#38;gt; $list) {&#60;br /&#62;
				if ($key !== &#34;signedUp2&#34;) {&#60;br /&#62;
					$disableElement = $list;&#60;br /&#62;
				} else {&#60;br /&#62;
					if ($list &#38;gt;= 16) {&#60;br /&#62;
						echo '&#60;br /&#62;
							&#38;lt;script type=&#34;text/javascript&#34;&#38;gt;&#60;br /&#62;
								$(document).ready(function() {&#60;br /&#62;
									$(&#34;input#element_6_'.$disableElement.'&#34;).attr(&#34;disabled&#34;, true);&#60;br /&#62;
								});&#60;br /&#62;
							&#38;lt;/script&#38;gt;';&#60;br /&#62;
					}&#60;br /&#62;
				}&#60;br /&#62;
			}&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Limit Entries per Field"</title>
<link>https://www.machform.com/forums/topic/limit-entries-per-field#post-21058</link>
<pubDate>Sun, 18 May 2014 07:44:29 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">21058@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;There are some changes with v4 code and most likely the custom code you are using need to be updated.&#60;br /&#62;
Can you let me know the code you added to the view-functions.php file please?
&#60;/p&#62;</description>
</item>
<item>
<title>jfurtado on "Limit Entries per Field"</title>
<link>https://www.machform.com/forums/topic/limit-entries-per-field#post-21040</link>
<pubDate>Thu, 15 May 2014 05:36:05 +0000</pubDate>
<dc:creator>jfurtado</dc:creator>
<guid isPermaLink="false">21040@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;In earlier versions I was able to add custom PHP code to view-functions.php file to query db, count number of entries for a specific field and execute a code depending on the result. That seems to no longer work. Is there an alternative? I understand I can limit entries for the whole form, but I need to do something more specific. In this case we are signing up hundreds of kids for a workshop sessions. Each session has limited of seats, so I need to be able to disable the specific dates that become full.&#60;/p&#62;
&#60;p&#62;Thanks for your help!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
