instagram rss arrow-down

This is a simple way for displaying Gravity Forms Entry Counter with a Shortcode. It extends Gravity Forms shortcode by providing a custom action and retrieving the total Gravity Forms entry count for a specific form ID.

This is what you need to do to activate Gravity Forms Entry Counter:

  1. Install the Gravity Forms
  • If you don’t have a Gravity Forms installed, you can buy it here.

2. Paste this code snippet

  • Paste this entire snippet at the end of your themes  functions.php file.

3. Use the Shortcode on page

  • To display the simple Gravity Forms Entry Counter, use the basic shortcode. Simply add your form ID and the shortcode will return total Gravity Forms entry count.
  • You can modify the shortcode to display Gravity Forms count by status and you can set the format. Statuses are: total, unread, starred, trash, spam; and formats should be comma or decimal

And a little bit of CSS:

You can paste the CSS code to your themes custom CSS editor.

Basic Shortcode for Gravity Forms entry counter

[gravityforms action="counter" id="your_form_id"]

[gravityforms action="counter" id="1"] 

Displaying Unread Entries Counter with decimal format

[gravityforms action="counter" id="1" status="unread" format="decimal"]

Attributes

  • id(int) – required. Your Form ID. Default = false
  • status(string) – optional. Default = total. Options are: “total”, “unread”, “starred”, “trash”, and “spam”.
  • format(string) – optional. Default = false. Sets the type of formatting when displaying the entry count. Options are comma or decimal.

gravity forms entry counter

 

Did you find this snippet useful? We hope you did!

Support New Articles with a Sweet Tee

One comment on “Gravity Forms Entry Counter with Shortcode

  • Rick Smith
    August 16, 2018 | 11:11 am

    This shortcode didn’t work for me. I added the code to the functions.php of my child theme. It only returns [gravityforms action=“counter” id=“31”] displayed on the page

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

*

*