🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 15, 2026

Gravity Forms Merge Tags: Modifiers for Text, Dates, Maths and Lookups

GravityExtra
Gravity Forms Merge Tags: Modifiers for Text, Dates, Maths and Lookups

Gravity Forms merge tags are the glue of every form: they put the visitor’s name in the confirmation, the answers in the notification email and the values in your CRM feed. But a merge tag inserts exactly what was typed. “aDA lovelace” stays “aDA lovelace”, a date always comes out in one format, and a number cannot be multiplied, rounded or formatted as money. As soon as you want an email to read naturally, you are told to write custom PHP.

This guide shows what you can do with Gravity Forms merge tags out of the box, where they stop, and how the Gravity Forms Advanced Merge Tags Premium Add-on adds chainable modifiers for text, dates, numbers and encoding, plus calculations, lookups of earlier entries and signed tokens, without a line of code.

What Gravity Forms Merge Tags Already Do

Every field has a merge tag such as {Name:1.3} or {Email:2}. Gravity Forms also offers a few built-in modifiers: :value for the value of a choice instead of its label, :label, :price and :qty for products, :urlencode and some date parts. Global tags add the form title, the entry ID, the entry date, the user and the page URL. That covers the basics, and nothing more.

Where Plain Merge Tags Fall Short

  • Inconsistent text. Visitors type names in capitals, with extra spaces or in lower case. Your emails repeat it.
  • Fixed dates. You cannot write “we will call you by Tuesday, October 20” or “your trial ends in 14 days”.
  • No maths. Hours times a rate, a deposit of 30% or a rounded estimate need a calculation field or code.
  • No privacy. You cannot show only the last four digits of a phone or account number.
  • No memory. A notification cannot say “this is the third request from this email”.
  • No safe links. Links to a follow-up form or an upload page need a token that cannot be guessed.

How Merge Tag Modifiers Work

A modifier changes a value before it is inserted. With the add-on you write modifiers after the field ID and chain them with a vertical bar; they run from left to right. Arguments go in brackets:

  • {Name:1.3:trim|title} → “Ada”
  • {Email:2:split(@,2)|upper} → “EXAMPLE.ORG”
  • {Message:4:truncate(80)} → the first 80 characters and an ellipsis
  • {Phone:6:mask(4)} → “***********0187”
  • {Hours:5:mul(15)|money} → “$187.50”

Gravity Forms’ own modifiers keep working and can come first in a chain: {Shift:7:value|upper} takes the choice value and turns it into capitals.

Merge Tags preview page in WordPress showing tags with modifiers and the result Hi Ada, a reference code and a weekday date
Try any tag on a real entry before you use it.

Dates: Formats, Working Days and Time Zones

Date fields are read in the format Gravity Forms stores them, so the result does not depend on how the date is shown in the form. Format them with PHP date letters, add or subtract time, and count days:

Merge tag Result (start date October 16, 2026)
{Start:3:dateformat(l, F j, Y)} Friday, October 16, 2026
{Start:3:dateadd(2 workdays)|dateformat(l, F j)} Tuesday, October 20
{Start:3:dateadd(1 month)|dateformat(d/m/Y)} 16/11/2026
{gx:today|dateadd(7 days)|dateformat(F j)} one week from today
{Birthday:9:age} whole years since the date

Working days skip Saturdays and Sundays, and adding a month to January 31 gives the last day of February instead of jumping into March. {gx:today} also works in field default values, so a “reply by” field can be pre-filled a week ahead.

Numbers and Calculations

Number modifiers add, subtract, multiply, divide, round and format values, including money in the form currency. For anything longer, {gx:calc:…} evaluates arithmetic with merge tags inside, for example {gx:calc:{Qty:3} * {Price:4} * 1.2|round(2)}. It supports brackets, powers and round, floor, ceil, abs, min, max and sqrt. It is a small calculator, not PHP: no code is ever run, and a division by zero simply gives an empty result.

Look Up Earlier Entries Safely

Lookups read other entries: {gx:count match="2" value="{Email:2}" exclude="current"} counts earlier requests from the same email, {gx:sum form="5" field="3" match="2" value="{Email:2}"} totals a donor’s gifts, and {gx:get …} returns a field of the newest matching entry. Because a lookup can show data from other entries, it is off until you allow it on the form being read and name the forms that may read it.

Form Settings Merge Tags tab with lookup access switched on and only the Volunteer sign-up form allowed to read the entries
Lookups are allowed per form, for the forms you choose.

Real Examples You Can Copy

  • Friendly greetings: Hi {Name:1.3:trim|title|default(there)},
  • Service promise: We will reply by {gx:today|dateadd(2 workdays)|dateformat(l, F j)}.
  • Booking confirmation: Your session starts {Date:3:dateformat(l, F j)} at {Time:4}.
  • Quote line: {Hours:5} hours × $85 = {Hours:5:mul(85)|money}
  • Masked details: Card ending {Card number:6:mask(4)}
  • Signed follow-up link: https://example.com/upload/?e={entry_id}&t={gx:token length="16"}
  • Returning supporter: Thank you for gift number {gx:count form="5" match="2" value="{Email:2}"}!
  • Campaign tracking: Campaign: {gx:url param="utm_campaign"|default(none)}
Confirmation message on a Gravity Forms form: Thanks Grace, a reference code, the start date as Friday October 16, the campaign fall-drive, the page title and a shortened note
A confirmation built with chained modifiers and standalone tags.

How to Add Your First Modifier in Two Minutes

  • Step 1. Install the add-on and activate your license under Forms → Settings → Merge Tags.
  • Step 2. Open Forms → Merge Tags, choose the form and one of its entries.
  • Step 3. Insert a field merge tag from the drop-down in a notification, then add :trim|title before the closing brace.
  • Step 4. Paste the same text into the preview box and click Preview to check the result for that entry.
  • Step 5. Save the notification and send a test entry. Add more modifiers one at a time, checking the preview after each.

Merge Tags in Feeds, Webhooks and CRMs

Modifiers are not only for emails. Most feed add-ons fill their fields with the standard merge tag replacement, so a CRM can receive a cleaned name, a date in the format its API expects, or a value already converted to cents. For webhooks, json escapes quotes and line breaks so a message never breaks the request body, and urlenc prepares values for query strings. Because every result is escaped for its location, the same tag is safe in an HTML email, a redirect URL and a plain-text feed.

Built to Be Safe

  • Escaped for its location: HTML-escaped in HTML emails and confirmations, URL-encoded in redirect links and plain in text emails.
  • No injection: merge tags typed by a visitor into a field are never run, even after a modifier.
  • Private data stays private: user and post meta keys that look like passwords, tokens, sessions or keys always return nothing.
  • Signed tokens use a secret of your site, so they cannot be recreated by someone who knows the entry ID.

The Full Reference Is Built In

Forms → Merge Tags lists every modifier with its arguments, grouped into text, dates, numbers and encoding, plus the standalone tags. Pick a form and an entry, type your text and click Preview to see the exact result before you paste it into a notification.

Reference table of merge tag modifiers grouped into Text, Dates, Numbers and Encode and tokens with arguments and descriptions
Over 40 modifiers, each with a one-line description.

Make Every Merge Tag Read Naturally

Chainable modifiers for text, dates, numbers and encoding, calculations, lookups and signed tokens for Gravity Forms.

Frequently Asked Questions

Where do the modifiers work?

Everywhere Gravity Forms replaces merge tags on the server: notifications, confirmations, redirect URLs and the feeds of add-ons that use the standard merge tag replacement.

Do my existing merge tags change?

No. Tags without modifiers, and tags with Gravity Forms’ own modifiers, work exactly as before.

What happens with a typo in a modifier?

A chain with an unknown modifier is left to Gravity Forms, which shows the plain value. Use the preview page to check a tag.

Are public holidays skipped by workdays?

No. Working days skip Saturdays and Sundays only.

Can visitors see data from other entries?

Only through lookups you allow on the form being read. Use lookups in admin notifications, or allow only what a visitor may see.

Do I need a particular Gravity Forms licence?

No. Any Gravity Forms licence, version 2.9 or newer, works.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr