Freeform 3.x

Legacy documentation for Freeform 3.x.

The Freeform:Count tag allows you to return a count of submissions to Freeform filtered on various parameters. Filtering is additive - the more fields you provide, the lower the count will be.

{exp:freeform:count} content {/exp:freeform:count} 

Parameters

The following parameters are available for use:

author_id=

author_id="3" 

Freeform collects the member ID of a logged in user each time a form is submitted. Use this parameter to filter down entries by submissions from a specific member.

collection= [new]

collection="Cheese Survey" 

This parameter is used by Freeform to organize postings across your various forms. You can filter the entries count by all submissions made to this dynamic collection name.

edit_date=

edit_date="3" 

When you make changes to a Freeform entry using the Freeform CP, the edit date is stored. Use this parameter to specify the amount of hours ago from now to filter in entries that have been edited within this timeframe. So for example, if you specify 3 in this parameter, Freeform will only display entries that have been edited within the past 3 hours.

entry_date=

entry_date="24" 

Specify the number of hours ago from now to filter in entries that have been submitted within this timeframe. So for example, if you specify 24 in this parameter, Freeform will only display entries that have been submitted within the past 24 hours.

group_id=

group_id="3" 

Freeform collects the group ID of a logged in user each time a form is submitted. Use this parameter to filter down entries by submissions from a specific member group.

ip_address=

ip_address="32.133.123.123" 

Use this parameter to filter down entries by submissions from a specific IP address.

status=

status="closed" 

Use this parameter to filter down entries that contain a certain status.

FREEFORM_FIELD_NAME=

FREEFORM_FIELD_NAME="VALUE" 

All Freeform fields as available in the Freeform CP are available for use as filtering parameters. To use a Freeform field to filter entries by a certain value, just specify the short_name of the field and set a value to be whatever you wish (ex: subject="help").

Variables

The following variables are available for use:

count

{count} 

This variable will be replaced by the total number of entries found based on the various filters you provided through your parameters.

Examples

The following example would display the total amount of entries that have been submitted to the Cheese Survey collection within the past 24 hours:

{exp:freeform:count collection="Cheese Survey" entry_date="24"}   <p>{count} entries have submitted within the last 24 hours</p>{/exp:freeform:count} 

The following example would display the total amount of entries that have been submitted to the Contact collection that contain the word Sales in the subject field:

{exp:freeform:count collection="Contact" subject="Sales"}   <p>{count} entries have submitted for the Sales department</p>{/exp:freeform:count}