The {entry_count} Merge Tag in Math by GravityView

When creating Gravity Forms calculations with the GravityMath add-on, it's often important to know how many total entries are used in the calculation.

Use the {entry_count} Merge Tag inside a [gravitymath] shortcode to help calculate averages.

Average order value of my Gravity Forms form

The shortcode below will take the total value of the Product field and divide it by the number of entries.

[gravitymath scope="form" id="123"]{Product:1:sum} / {entry_count}[/gravitymath]

Note: {entry_count} here is the same as {entry_count:form} because it uses the scope value passed by the shortcode (scope="form")

Scopes

{entry_count} will switch automatically between three numbers based on the scope attribute used in the [gravitymath] shortcode:

  • Form
  • View
  • Visible

A Gravity Forms Merge Tag that shows the number of entries in a form

To show the number of entries in a Gravity Forms form, use {entry_count:form} The number of entries in a Gravity Forms form (not spam or in the trash).

The {entry_count} Merge Tag to show the number of entries in a View—or currently visible in a View

The Merge Tag also includes "modifiers" that allow you to display different information.

  • {entry_count:visible} The number of visible entries in a View
  • {entry_count:view} The number of total entries for a View (or search result)
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us