sandywp / plugins / gravitywp-count
GravityWP – Count
Count, filter and display the number of Gravity Forms entries or the total of a number field for multiple entries.
Ready in seconds.
v0.9.15 1,000+ installs WP 3.0.1+

About this plugin
Visit GravityWP.com for documentation.
Most simple version of the shortcode (Count and display the number of entries Gravity Forms for a form):
[gravitywp_count formid='']
Or when you want the total of the values of a number field (display the sum of the values of a number field for all entries a specific Gravity Form):
[gravitywp_count formid='' number_field='']
The most extensive version of the shortcode (display the total value of a number field from multiple Gravity Forms entries with up to five filters and input for number of decimals, the decimal point notation and the thousand seperator, etc, etc):
[gravitywp_count formid='' formstatus='' number_field='' filter_mode='' filter_field='' filter_operator='' filter_value='' filter_operator2='' filter_field2='' filter_value2='' filter_field3='' filter_operator3='' filter_value3='' filter_field4='' filter_operator4='' filter_value4='' filter_field4='' filter_operator4='' filter_value4='' decimals='' dec_point='' thousands_sep='' is_read='yes' is_approved='yes' is_starred='no' created_by='1' multiply='2' start_date='12/31/2016' end_date='12/31/2017' workflow_step='' workflow_step_status='complete' workflow_step_is_current='true']
Questions
- Does this plugin rely on anything?
Yes, you need to install the Gravity Forms Plugin for this plugin to work.
- Are there plugins doing the same as GravityWP Count?
Yes, you can use GFCharts to make calculations instead. It’s easy to make the same calculations with GFCharts and you can easily use JavaScript to change the output format or number value. Download GFCharts here (affiliate link)
- Is Gravityview approval status supported?
Thanks to the wonderful support of GravityView (affiliate link) we also added a filter for approval status:
[gravitywp_count formid="2" number_field="4" is_approved="yes"]is_approved: Do you want to count only for the approved entries in GravityView? Or only the entries that are not approved? Add is_approved=”yes” or is_approved=”no” to your shortcode attributes.
- Is Gravity Flow supported?
Yes, Gravity Flow (affiliate link) is also supported. To simply show the number of entries that are at a specific Gravity Flow step, use this shortcode:
[gravitywp_count formid="2" workflow_step="5"]You have to use the workflow step ID to filter the number of entries that are currently pending on that step. You can use the GravityWP – Merge Tags plugin to easily find the ID (or even the shortcode to use). The plugin will provide a page with all the details of Gravity Flow steps for every form, including the shortcode to use.
Or, the more difficult variant, you can open the step you want to filter on and check the url. It will be something like this:
gravitywp.com/wp-admin/admin.php?page=gf_edit_forms&view=settings&subview=gravityflow&id=2&fid=5The last number in the url (the ‘fid=5’) shows the ID of the workflow step.
workflow_step: Fill in the workflow step ID here to use as a filter.
workflow_step_status: This is a comma seperated string. You can use one or both of the following options: pending,complete.
workflow_step_is_current: this can be set to true or false. If set to false, it will count everything that is in workflow steps after the selected workflow_step (including the selected workflow_step).- Does GravityWP Count work with the Gravity Encryption plugin?
GravityWP Count won’t work without extra code when you use the Gravity Encryption plugin on your site
- How do I show only the count for the current logged-in user?
If you only want to show the total entries or the count of a number field for the currently logged-in user, you can use
created_by="current"- How to use the shortcode for counting entries?
Here you find the shortcodes to count the total of entries (with or without filters). You will notice that you don’t have to fill in decimals or decimal points, because these shortcodes only count the total of entries (which is always a whole number). It is possible to define a thousand seperator.
[gravitywp_count formid="2" thousands_sep=","]or use the default (thousand separator is a comma):
[gravitywp_count formid="2"]formid: This is the id of the form you want to target your shortcode at. It’s in orange. This will also accept a comma-seperated array of form id’s.
thousands_sep: The thousands seperator is to, what it says, the notation you use to seperate thousands. In the USA this is a comma, in Europa this is a point. For example a million in USA is: 1,000,000.00 and in Europe it is: 1.000.000,00. You can define the thousands seperator in the shortcode.- How do I use values to filter the results?
You can use filters to only show the calculations you want (based on fields in the form). To use one filter, use this shortcode:
[gravitywp_count formid="2" filter_field="3" filter_value="IT developer" thousands_sep="," ]filter_field: this is the Field ID you want to use in your filter. Go to your Gravity Form, go to the Field (text, dropdown, radio button) you want to use as your filter and write down the Field ID number to use in filter_field in your shortcode.
filter_value: write here the exact value that is in your text, radio button or dropdown. If you clicked ‘show values’, use the text under Value (don’t use the label).With 2 filters
[gravitywp_count formid="2" filter_field="3" filter_value="IT developer" filter_field2="5" filter_value2="41 and older" thousands_sep="," ]filter_field2: this is the Field ID you want to use in your second filter.
filter_operator2: an optional comparison operator, possible values: =, is, contains, is not, isnot, <>, like, not in, notin, or in. Defaults to =.
filter_value2: write here the exact value that is in your text, radio button or dropdown (for the second filter!). If you clicked ‘show values’, use the text under Value.You can use up to 5 filters.
sandywp / also on the shelf
Try another plugin
4.7 · 20K+ installs
Easily manage downloadable files and monitor downloads of your digital files from your WordPress site.
4.6 · 4K+ installs
Add a "Post View Count" plugin to get the count of views for your posts.
4.3 · 1K+ installs
Displays a column with the character count for each post in the Manage Posts SubPanel and in the Edit Posts SubPanel.
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.