<?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: Totaling all entries from a specific field as a counter</title>
		<link>https://legacy.forums.gravityhelp.com/topic/totaling-all-entries-from-a-specific-field-as-a-counter</link>
		<description>Gravity Support Forums Topic: Totaling all entries from a specific field as a counter</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 07:15:02 +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/totaling-all-entries-from-a-specific-field-as-a-counter" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Totaling all entries from a specific field as a counter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/totaling-all-entries-from-a-specific-field-as-a-counter#post-41599</link>
			<pubDate>Fri, 18 Nov 2011 18:57:26 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">41599@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, i'm aware the example code used the total submissions of the form. It's just an example.  You'll need to take that code and customize it to suit your needs.  Or work with a WordPress consultant to create the customization for you if you aren't sure how to properly query the data.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>websitedesignercharlotte on "Totaling all entries from a specific field as a counter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/totaling-all-entries-from-a-specific-field-as-a-counter#post-41589</link>
			<pubDate>Fri, 18 Nov 2011 17:46:05 +0000</pubDate>
			<dc:creator>websitedesignercharlotte</dc:creator>
			<guid isPermaLink="false">41589@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks so much Carl for your timely reply and I will post only on this thread. Sorry about the duplicate. I read all forum posts including the one above referencing totaling poll submissions but never really found where to begin with actually totaling counts from one specific field. The code in the article above references the total submissions of the form but not the ability to sum as a better definition all entries from one field.&#60;br /&#62;
Example:&#60;br /&#62;
Entry one on dropdown field &#34;Fish Caught&#34; - 10&#60;br /&#62;
Entry two on dropdown field &#34;Fish Caught&#34; - 20 &#60;/p&#62;
&#60;p&#62;Query should select all entries from form 1 field fish caught sum them and echo total (30) fish caught. See &#60;a href=&#34;http://www.myfish.com/all-logged-fish/&#34; rel=&#34;nofollow&#34;&#62;http://www.myfish.com/all-logged-fish/&#60;/a&#62; and view the sidebar for desired result. See &#60;a href=&#34;http://www.myfish.com/enter-a-fishing-trip-log/&#34; rel=&#34;nofollow&#34;&#62;http://www.myfish.com/enter-a-fishing-trip-log/&#60;/a&#62; for the form used. Thank you so much for your help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Totaling all entries from a specific field as a counter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/totaling-all-entries-from-a-specific-field-as-a-counter#post-41571</link>
			<pubDate>Fri, 18 Nov 2011 16:38:14 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">41571@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This should be possible.  The Gravity Forms entry data is stored in your WordPress database.  So it can be queried and parsed just like any data.  This wouldn't require Gravity Forms hooks/filters because you aren't actually changing Gravity Forms.  You would be displaying data outside of Gravity Forms.&#60;/p&#62;
&#60;p&#62;Here is a post that discusses how to write custom code to get a count of the total number of entries for a form:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/display-entries-count-on-site&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/display-entries-count-on-site&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You could start with that, then you would have to customize it so rather than getting an entry count you get a count of field selections.  It's a bit more complex for sure.&#60;/p&#62;
&#60;p&#62;Give it a shot, and if you need further assistance after giving it a try... we can take a look and help you out with the code.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>websitedesignercharlotte on "Totaling all entries from a specific field as a counter"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/totaling-all-entries-from-a-specific-field-as-a-counter#post-41547</link>
			<pubDate>Fri, 18 Nov 2011 15:36:40 +0000</pubDate>
			<dc:creator>websitedesignercharlotte</dc:creator>
			<guid isPermaLink="false">41547@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am working on a site called MyFish.com that is a fishing and biological data log. I have two dropdown fields on this form &#60;a href=&#34;http://www.myfish.com/enter-a-fishing-trip-log/&#34; rel=&#34;nofollow&#34;&#62;http://www.myfish.com/enter-a-fishing-trip-log/&#60;/a&#62; (user:demofisherman / pass:demo)  that I want to total and display in a text widget as a counter in the sidebar. &#60;/p&#62;
&#60;p&#62;The fields are fish caught and fish released which are both numerical dropdowns.. Each form submission has a variable amount of fish caught and released.&#60;br /&#62;
Example:&#60;br /&#62;
fisherman 1: 15 fish caught &#124; 10 released&#60;br /&#62;
fisherman 2: 25 fish caught &#124; 12 released&#60;br /&#62;
I want to extract the meta for ALL entries for these specific fields on this one form and display a running total as users enter fish in the log. Is this possible using the current hooks, filters and a little php? I have a functioning &#34;counter&#34; working on the thank you page and in the sidebar by passing two variables in the url (fishcount and fishreleased) to the thank you page and running the following code in the post. The code updates a simple text document and uses similar code to echo it in the sidebar in a text widget.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Thank you for logging your &#38;lt;?php $fishcount=$_GET[&#38;quot;fishcount&#38;quot;]; echo $fishcount; ?&#38;gt; fish!

Total fish logged on MYFish.com:
&#38;lt;?php
$fishcount=$_GET[&#38;quot;fishcount&#38;quot;];
	if (file_exists(&#38;#39;count_file.txt&#38;#39;))
	{
		$fil = fopen(&#38;#39;count_file.txt&#38;#39;, r);
		$dat = fread($fil, filesize(&#38;#39;count_file.txt&#38;#39;));
		echo $dat+$fishcount;
		fclose($fil);
		$fil = fopen(&#38;#39;count_file.txt&#38;#39;, w);
		fwrite($fil, $dat+$fishcount);
	}

	else
	{
		$fil = fopen(&#38;#39;count_file.txt&#38;#39;, w);
		fwrite($fil, 1);
		echo &#38;#39;1&#38;#39;;
		fclose($fil);
	}
?&#38;gt;

Total fish Released:
&#38;lt;?php
$fishreleased=$_GET[&#38;quot;fishreleased&#38;quot;];
	if (file_exists(&#38;#39;count_released.txt&#38;#39;))
	{
		$fil = fopen(&#38;#39;count_released.txt&#38;#39;, r);
		$dat = fread($fil, filesize(&#38;#39;count_file.txt&#38;#39;));
		echo $dat+$fishcount;
		fclose($fil);
		$fil = fopen(&#38;#39;count_released.txt&#38;#39;, w);
		fwrite($fil, $dat+$fishreleased);
	}

	else
	{
		$fil = fopen(&#38;#39;count_released.txt&#38;#39;, w);
		fwrite($fil, 1);
		echo &#38;#39;1&#38;#39;;
		fclose($fil);
	}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I know this method presents a lot of problems and querying the actual entries is the correct way. How do I do this?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
