<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Limit entries with count in field</title>
		<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-with-count-in-field</link>
		<description>Gravity Support Forums Topic: Limit entries with count in field</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:14:06 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/limit-entries-with-count-in-field" rel="self" type="application/rss+xml" />

		<item>
			<title>kevinmcgillivray on "Limit entries with count in field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-with-count-in-field#post-219921</link>
			<pubDate>Mon, 22 Apr 2013 21:35:31 +0000</pubDate>
			<dc:creator>kevinmcgillivray</dc:creator>
			<guid isPermaLink="false">219921@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sakari, did this end up working out for you?  I'm trying to do something similar and it looks like your code may be a good starting point.  My only question is that it seems like your code above would put a limit on ALL forms.  Is the case or does 8.1 only refer to a specific field that is unique across all forms?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sakari on "Limit entries with count in field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-with-count-in-field#post-154160</link>
			<pubDate>Mon, 25 Feb 2013 10:09:14 +0000</pubDate>
			<dc:creator>sakari</dc:creator>
			<guid isPermaLink="false">154160@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks. I made quick and dirty solution by combining couple of examples&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function count_with_avecs($form){

  $count = 0;
  $leads = RGFormsModel::get_leads($form[&#38;quot;id&#38;quot;]);

  foreach($leads as $id =&#38;gt; $lead) {
	$count++;
	if( $lead[&#38;#39;8.1&#38;#39;] == &#38;quot;KYLLÄ&#38;quot; ) $count++;
  }

  if( $count &#38;gt;= $form[&#38;#39;limitEntriesCount&#38;#39;] ) {
	  $limit_message = $form[&#38;#39;limitEntriesMessage&#38;#39;];
      add_filter(&#38;#39;gform_get_form_filter&#38;#39;, create_function(&#38;#39;&#38;#39;, &#38;quot;return &#38;#39;&#38;lt;p class=\&#38;quot;limitmessage\&#38;quot;&#38;gt;$limit_message&#38;lt;/p&#38;gt;&#38;#39;;&#38;quot;) );
  }

  return $form;
}

add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;count_with_avecs&#38;quot;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;TODO: fix if( $lead['8.1'] == &#34;KYLLÄ&#34; ) to search right field automaticly (This KYLLÄ means Yes and it's the value. It can be easily changed to field to have different count in it...)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Limit entries with count in field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-with-count-in-field#post-152342</link>
			<pubDate>Fri, 22 Feb 2013 11:06:37 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">152342@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Gravity Forms does its entry limit by submitted entries, and you can't create two entries from one submission and Gravity Forms doesn't have an inventory system. A heavily customized version of the following might help: &#60;a href=&#34;http://gravitywiz.com/better-inventory-with-gravity-forms/&#34; rel=&#34;nofollow&#34;&#62;http://gravitywiz.com/better-inventory-with-gravity-forms/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sakari on "Limit entries with count in field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-with-count-in-field#post-152128</link>
			<pubDate>Fri, 22 Feb 2013 05:47:32 +0000</pubDate>
			<dc:creator>sakari</dc:creator>
			<guid isPermaLink="false">152128@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I used that build-in functionality to limit the number of entries allowed for my event and it works fine. Now I would like to add field &#34;[ ] I have avec with me&#34; -field the add two visitors to limit count at once. (I can also use select with counts if it's easier.)&#60;/p&#62;
&#60;p&#62;Is there any easy way to do this kind of calculation to get right count?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
