Plugins
0

GravityWP – Count

LICENSE TYPE: INFINITE

Description

Most simple version of the shortcode (display number of total entries Gravity Forms for a form):

[gravitywp_count formid=''] 

Or when you count a number field (display total count 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 count 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'] 

Installation

Upload the plugin files to the /wp-content/plugins/gravitywp-count directory, or install the plugin through the WordPress plugins screen directly.

FAQ

Yes, you need to install the Gravity Forms Plugin for this plugin to work.

Yes, you can use GFCharts to make calculations instead. Its 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)

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.

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=5 

The 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).

GravityWP Count wont work without extra code when you use the Gravity Encryption plugin on your site

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" 

Here you find the shortcodes to count the total of entries (with or without filters). You will notice that you dont 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. Its in orange
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.

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 (dont 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_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.

Here you find the shortcodes you can use to calculate the totals of number fields in multiple Gravity Forms entries.

Count and display a number field calculation (without filters):
If you want to count the total of a number field from multiple entries, use this shortcode:

[gravitywp_count formid="2" number_field="4" decimals="2" dec_point="." thousands_sep="," ] 

or use the default shortcode (2 decimals, dec_point =. and thousands_sep=,):

[gravitywp_count formid="2" number_field="4"] 

number_field: This is the ID of the number field you want to target. Make sure this is a number field!
decimals: This is how many decimals you want to show (after the point (if you are in the US or England) or after the comma (if you are in Europe or the rest of the world)). You can type 0 (zero) if you only want to show whole numbers. You can type 1, 2, 3, 4 or 10 or more to show more decimal numbers.
dec_point: This is what decimal point you want to use. In the USA and England this is a point. In Europe, the comma is used to show the decimal point. For example: USA: 1.23 and Europe: 1,23.

If you want to use the Count Plugin and filter on 1 field (text, dropdown, radio button), use this shortcode:

[gravitywp_count formid="2" number_field="4" filter_field="3" filter_value="IT developer" decimals="2" dec_point="." thousands_sep="," ] 

Two filter fields:
If you want to use the Count Plugin and filter on 2 fields (text, dropdown, radio button), use this shortcode:

[gravitywp_count formid="2" number_field="4" filter_field="3" filter_value="IT developer" filter_field2="5" filter_value2="41 and older" decimals="2" dec_point="." thousands_sep="," ] 

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Most Viewed Posts
Menu