<?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 showing wrong remaining number</title>
		<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number</link>
		<description>Gravity Support Forums Topic: Limit entries showing wrong remaining number</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 23:26:21 +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-showing-wrong-remaining-number" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-191885</link>
			<pubDate>Sun, 31 Mar 2013 17:09:35 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">191885@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You're welcome.  I'm glad that's working for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>asmiles on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-186804</link>
			<pubDate>Wed, 27 Mar 2013 14:17:03 +0000</pubDate>
			<dc:creator>asmiles</dc:creator>
			<guid isPermaLink="false">186804@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you so much for your help (especially the last piece Chris to not count trash items). My forms are now complete after many hours of development and work great&#60;/p&#62;
&#60;p&#62;Regards&#60;/p&#62;
&#60;p&#62;Al
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-93262</link>
			<pubDate>Mon, 19 Nov 2012 23:17:23 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">93262@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In the code of your first post, change line 6 to this to exclude trashed entries.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
// parameters for reference:
// get_lead_count($form_id, $search, $star=null, $read=null, $start_date=null, $end_date=null, $status=null, $payment_status = null)
$entry_count = RGFormsModel::get_lead_count($form[&#38;#39;id&#38;#39;], &#38;#39;&#38;#39;, null, null, null, null, &#38;#39;active&#38;#39;, null);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The addition of &#34;active&#34; as the 7th parameter there should exclude entries which are in the trash.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>asmiles on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-93182</link>
			<pubDate>Mon, 19 Nov 2012 20:19:03 +0000</pubDate>
			<dc:creator>asmiles</dc:creator>
			<guid isPermaLink="false">93182@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;&#34;or modify the code to account for entries which might have a status of &#34;trash&#34;. &#60;/p&#62;
&#60;p&#62;Don't suppose you could help a wordpress/php newb with that could you please?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-89377</link>
			<pubDate>Fri, 09 Nov 2012 17:44:58 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">89377@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;When the entry is trashed, it remains in the rg_leads table with a status of &#34;trash&#34;.  In those previous code examples, if you have an entry in the trash, it would still be counted as a submitted entry. You could modify the code to account for trash status, and not count those, or just delete your test entries permanently from the trash.&#60;/p&#62;
&#60;p&#62;Once you click &#34;delete permanently&#34; (while viewing a trashed entry) it's deleted from the database permanently.  If that is not happening for you, it's possible you had caching turned on at some point?  Or you may have a theme or plugin conflict.&#60;/p&#62;
&#60;p&#62;To summarize: a trashed entry is still in the rg_leads table, with a status of trashed, so those code examples probably still counted it as a lead.  Delete the entry from the trash, and the code will be fine, or modify the code to account for entries which might have a status of &#34;trash&#34;.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-89293</link>
			<pubDate>Fri, 09 Nov 2012 13:54:11 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">89293@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I will send a note to the development team about this to make sure it is on the list or if for some reason it is working that way on purpose, to leave a reason why. All my best!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>asmiles on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-89291</link>
			<pubDate>Fri, 09 Nov 2012 13:52:30 +0000</pubDate>
			<dc:creator>asmiles</dc:creator>
			<guid isPermaLink="false">89291@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;will future releases avoid the data being left in the  _rg_leads file when deleted?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-89166</link>
			<pubDate>Fri, 09 Nov 2012 06:34:21 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">89166@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm not sure I understand your last question.  Can you please rephrase it.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>asmiles on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-88972</link>
			<pubDate>Thu, 08 Nov 2012 20:18:33 +0000</pubDate>
			<dc:creator>asmiles</dc:creator>
			<guid isPermaLink="false">88972@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;YIPPERS! I learned something new today. I cleaned out the  _rg_leads table and it worked! &#60;/p&#62;
&#60;p&#62;Is there a fix other than you've mentioned planned for this?&#60;/p&#62;
&#60;p&#62;Awesome thanks..........
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Limit entries showing wrong remaining number"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/limit-entries-showing-wrong-remaining-number#post-88596</link>
			<pubDate>Wed, 07 Nov 2012 23:07:05 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">88596@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I would echo $form['limitEntriesCount'] and $entry_count to see what they contain.&#60;/p&#62;
&#60;p&#62;Also, are the entries still in the trash?  I think that code snippet was written before the trash functionality existed and maybe those entries are still being counted.&#60;/p&#62;
&#60;p&#62;If you have database access, can you check to be sure there are no leads for this form in the _rg_leads table?&#60;/p&#62;
&#60;p&#62;David Smith has also written a couple of articles on other ways of accomplishing the same thing:&#60;br /&#62;
&#60;a href=&#34;http://gravitywiz.com/2012/09/19/shortcode-display-number-of-entries-left/&#34; rel=&#34;nofollow&#34;&#62;http://gravitywiz.com/2012/09/19/shortcode-display-number-of-entries-left/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Maybe one of his approaches will work better for you.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
