<?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: cap on entries - email notification</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: cap on entries - email notification</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 01:27:36 +0000</pubDate>

<item>
<title>yuniar on "cap on entries - email notification"</title>
<link>https://www.machform.com/forums/topic/cap-on-entries-email-notification#post-11740</link>
<pubDate>Fri, 01 Apr 2011 19:25:05 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">11740@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Forrest,&#60;/p&#62;
&#60;p&#62;Yes, you can use the code for more than one form and you are doing it correctly with that code.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$form_limits[2] = 100;
$form_limits[6] = 100;
$form_limits[9] = 100;
$form_limits[21] = 100;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;those are the codes needed to use the limit on multiple forms.&#60;br /&#62;
The if statement doesn't need any change.
&#60;/p&#62;</description>
</item>
<item>
<title>fmolstad on "cap on entries - email notification"</title>
<link>https://www.machform.com/forums/topic/cap-on-entries-email-notification#post-11731</link>
<pubDate>Thu, 31 Mar 2011 03:09:01 +0000</pubDate>
<dc:creator>fmolstad</dc:creator>
<guid isPermaLink="false">11731@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hello.&#60;br /&#62;
I was wondering if you had to use this code on more than one form.&#60;br /&#62;
Can this be pasted in the post-functions.php  more than once.&#60;/p&#62;
&#60;p&#62;Or would I just add...&#60;/p&#62;
&#60;p&#62;$form_limits[2] = 100;&#60;br /&#62;
$form_limits[6] = 100;&#60;br /&#62;
$form_limits[9] = 100;&#60;br /&#62;
$form_limits[21] = 100;&#60;/p&#62;
&#60;p&#62;...and then the if statement?&#60;/p&#62;
&#60;p&#62;Forrest
&#60;/p&#62;</description>
</item>
<item>
<title>lydia on "cap on entries - email notification"</title>
<link>https://www.machform.com/forums/topic/cap-on-entries-email-notification#post-8174</link>
<pubDate>Mon, 14 Dec 2009 17:58:40 +0000</pubDate>
<dc:creator>lydia</dc:creator>
<guid isPermaLink="false">8174@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;thanks, i'll try this.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "cap on entries - email notification"</title>
<link>https://www.machform.com/forums/topic/cap-on-entries-email-notification#post-8090</link>
<pubDate>Wed, 02 Dec 2009 07:17:40 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">8090@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Okay, let say you have a form with id number 7 and you would like to limit the entries to a maximum 100 entries.&#60;/p&#62;
&#60;p&#62;Edit your &#34;includes/post-functions.php&#34; file, search around line 46:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$element_child_lookup[&#38;#39;address&#38;#39;] 	 = 5;
$element_child_lookup[&#38;#39;simple_name&#38;#39;] = 1;
$element_child_lookup[&#38;#39;name&#38;#39;] 		 = 3;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;above those lines, add this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//Start form limit code -----------------------
$form_limits[7] = 100; 

if(!empty($form_limits[$form_id])){
	$entry_limit = $form_limits[$form_id];
	$query = &#38;quot;select count(*) current_entry from ap_form_{$form_id}&#38;quot;;
	$result = do_query($query);
	$row = do_fetch_result($result);

	if($row[&#38;#39;current_entry&#38;#39;] &#38;gt;= $entry_limit){
		$process_result[&#38;#39;status&#38;#39;] = false;
		$process_result[&#38;#39;custom_error&#38;#39;] = &#38;quot;Sorry, this form is limited to {$entry_limit} entries.&#38;quot;;
		do_query(&#38;quot;update ap_forms set form_active=&#38;#39;0&#38;#39; where form_id={$form_id}&#38;quot;);
	}
}
//End form limit code -------------------------&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That should do it. Just make sure to adjust this value&#60;strong&#62;$form_limits[7] = 100;&#60;/strong&#62; with your own value.
&#60;/p&#62;</description>
</item>
<item>
<title>lydia on "cap on entries - email notification"</title>
<link>https://www.machform.com/forums/topic/cap-on-entries-email-notification#post-8083</link>
<pubDate>Tue, 01 Dec 2009 13:42:37 +0000</pubDate>
<dc:creator>lydia</dc:creator>
<guid isPermaLink="false">8083@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Yuniar,&#60;/p&#62;
&#60;p&#62;great how do i automatically do that?&#60;/p&#62;
&#60;p&#62;thanks&#60;br /&#62;
Lydia
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "cap on entries - email notification"</title>
<link>https://www.machform.com/forums/topic/cap-on-entries-email-notification#post-8061</link>
<pubDate>Sat, 28 Nov 2009 13:35:15 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">8061@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hmm... how about disabling the form automatically after reached a set number of entries?&#60;br /&#62;
This one would be possible.
&#60;/p&#62;</description>
</item>
<item>
<title>lydia on "cap on entries - email notification"</title>
<link>https://www.machform.com/forums/topic/cap-on-entries-email-notification#post-8058</link>
<pubDate>Fri, 27 Nov 2009 16:30:38 +0000</pubDate>
<dc:creator>lydia</dc:creator>
<guid isPermaLink="false">8058@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Is it possible to receive an email notification that alarms you when the entries have reached a set number e.g. 100. Then i can go ahead and disable the form&#60;/p&#62;
&#60;p&#62;thanks&#60;br /&#62;
Lydia
&#60;/p&#62;</description>
</item>

</channel>
</rss>
