Documentation

Calculation Merge Tags – List Field Calculations

The GravityWP List Number Format add-on extends the standard Gravity Forms List field by enabling number formatting and built-in calculations. This documentation outlines how merge tags can be used for list field calculations, such as column totals and row-level operations inside List fields.

Functionality Overview

When number formatting is enabled on a List field column, you can:

  • Reference specific columns in calculations
  • Perform row-level calculations inside the List field
  • Calculate column totals using a Number field outside the List
  • Count the number of rows in a List field

Merge tags are context-aware. The same tag may return a row value or a column sum depending on where it’s used.

Column Totals and Row Count in List Field Calculations

You can use merge tags in a Number field outside the List to display the sum of a specific column or count the number of rows in the list.

Column Total (Sum)
{List:1.2}
  • Returns the sum of all values in column 2 of List field ID 1.
Row Count
{List:1}
  • Returns the number of rows currently filled in List field ID 1.

These are commonly used for subtotals or summary fields.

Row-Level Calculations Inside the List

You can configure a column in a List field to calculate its value using other columns in the same row.

Example:
{Order Items:1:2} * {Order Items:1:3}

If column 1 is Quantity and column 2 is Unit Price, this formula used in column 3 will calculate the total per row. When used inside the List field, merge tags like {List:1.2} refer to the value of that column in the current row.

Gravity Forms formula setup using merge tags to perform row-level list field calculations with column multiplication.
Gravity Forms List Field settings showing Number Format options and calculation checkboxes for list field calculations.

Merge Tag Syntax for List Field Calculations

Merge Tag FormatDescription
{List:FieldID.Column}Value of a column in a row or total (depends on context)
{List:FieldID}Total number of rows in the list
Labels Are Optional

Gravity Forms and GravityWP merge tags only require a valid field ID — the label part is ignored. This means the following examples are all valid:

{:1} — Refers to field ID 1
{:1.1} — Refers to column 1 of List field ID 1
{notthelabel:1} — Still works, because only the field ID matters

Use any label or even omit it entirely — as long as the field ID is correct, the merge tag will function.

Notes

  • Merge tags work in any Number field or calculated List column.
  • The same merge tag can return different values depending on where it’s used.
  • If merge tags do not appear in the dropdown, you can manually type them.

Last updated: 21-05-2025

List Number Formatv2.1.4

You need the List Number Format Add-on to have this functionality on your site.

Read more