☰

Premium Gravity Forms add-on

Text Field Variables

Write template text once and fill in the details later

Text Field Variables is a Gravity Forms add-on that lets you use your own placeholders, such as customer_name, in Single Line Text and Paragraph Text fields. You define the values per form and decide when they are replaced: with a shortcode, a merge tag modifier or a Gravity Flow step.

  • 30-day money-back guarantee
  • Support from the developers
The form settings map **variables** to fields, a date merge tag and a fixed e-mail address. A welcome letter with those variables is filled in and submitted, and the confirmation shows the letter with every variable replaced.

For teams that write letters, messages and notes with Gravity Forms and want reusable template text instead of retyping the same details.

Write it once

Put placeholders in your template text and reuse it for every entry, instead of rewriting names and details by hand.

You choose when values appear

Variables are replaced when you show the text with the shortcode or merge tag modifier, or in a Gravity Flow step, for example only after an approval.

Only where you allow it

You define the variables per form and switch them on per field, so other fields and forms stay untouched.

Use cases

  • Keep one standard welcome letter in a Paragraph Text field and fill in the customer and company name for each entry.
  • Prepare customer messages with placeholders that are filled in only after a Gravity Flow approval step.
  • Generate final text after a staff review step, with the replacement noted on the entry.
  • Show personalized text from an entry on a WordPress page with the shortcode.
  • Copy the same set of variables to another form with export and import.

Features

  • Custom variables per form

    In Form Settings → Text Field Variables you add a variable name and its value. A value can be static text or a Gravity Forms merge tag, and names without double asterisks are wrapped automatically, for example **customer_name**.

  • Allow Variables per field

    Turn on Allow Variables in the field settings of a Single Line Text or Paragraph Text field. Only those fields process variables.

  • Shortcode output

    Show the replaced text on a page with [[replace_gwp_text_field_variables form_id="97" entry_id="999"]…[/replace_gwp_text_field_variables]], after you enable Enable Shortcode Conversion for this form. Shortcodes inside it are processed too.

  • Merge tag modifier

    Add :replace_gwp_text_field_variables to a field merge tag, for example {Letter:3:replace_gwp_text_field_variables}, to show the field with its variables replaced.

  • Gravity Flow step

    With Gravity Flow active, a Replace Variables step replaces the variables during a workflow. The step adds a note to the entry that says whether the variables were replaced.

  • Import and export

    Export a form’s variables as a JSON string and import them into another form, so you do not have to enter them again.

Ready to use Text Field Variables? 30-day money-back guarantee.

Buy now

Why GravityWP

Gravity Forms specialists since 2014. The people who build the add-ons also answer your questions.

5.0/5from 30 reviews on WordPress.org and GoogleRead more

Built the Gravity Forms way

Our add-ons use the official Gravity Forms add-on framework, so settings, feeds and entries work the way you already know.

Compatibility guaranteed

Works with current Gravity Forms versions and certified add-ons like Gravity Flow, GravityView and Gravity Perks. If something conflicts, we fix it.

Support from the developers

Your question goes straight to the people who wrote the code. Good feature requests often make it into the next release.

What customers say

Your plugins have been so incredibly helpful and useful, looking back I don’t know how I would have managed this current project without them.
Gravity Forms developer, freelance
Thank you for your superior products and support. We appreciate all you do for our form productivity and features we are able to offer to our clients. Your excellence makes us look good!
Staff member, nonprofit organization
Glad I didn’t ask for a refund with this level of excellent support.
Independent developer

More about GravityWP

Get Text Field Variables

Yearly license with updates and email support. Prices excl. VAT.

All Access

$139/year

All 15 premium add-ons, 1 site
$9.27 per add-on

Get All Access

30-day money-back guarantee on your first purchase. Refund policy. When a license ends, everything you installed keeps working; only downloads, updates and support stop. Compare all licenses

Questions before you start? Ask us

Frequently Asked Questions

Which Gravity Forms fields does it support?

Single Line Text and Paragraph Text fields. You turn on Allow Variables for each field where variables should be replaced.

Is Text Field Variables the same as Gravity Forms merge tags?

No. Merge tags insert form, entry, user or field values. Text Field Variables lets you create your own placeholders inside text fields and replace them later; the two work together, because a variable’s value can be a merge tag.

Does Text Field Variables work with Gravity Flow?

Yes. When Gravity Flow is installed, a Replace Variables step is available, so you can replace the variables at a chosen point in a workflow instead of right away.

Is shortcode conversion safe to enable?

Enable it with care. Any user who can add shortcodes could show the variables of other entries by changing the entry ID, so only enable it when those values are not sensitive and user permissions are set correctly.

What happens when my license expires?

Everything you installed keeps working. You no longer get downloads, updates, new features and support until you renew.

Can I get a refund?

Yes, within 30 days of your first purchase. Request it through your account on my.gravitywp.com. Renewals are not refunded; see the refund policy.

Examples

With these variables defined in the form settings:

VariableValue
**customer_name**Jane Doe
**company_name**GravityWP

A Paragraph Text field with Allow Variables turned on contains:

Dear **customer_name**,
Welcome to **company_name**.

Shown with the shortcode or with {Letter:3:replace_gwp_text_field_variables}, the text becomes:

Dear Jane Doe,
Welcome to GravityWP.

The raw field value still shows the placeholders. All settings are described in the documentation.

Requirements

  • Gravity Forms
  • Optional: Gravity Flow, for the Replace Variables workflow step

Current version 1.1.2, updated 2 September 2026. View the changelog

Documentation and tutorials

All Text Field Variables documentation

Changelog of Text Field Variables

v1.1.2

  • License and Update handler improvements

v1.1.1

  • License and Update handler improvements

1.1.0

  • Added license handler.
  • Fixed shortcode handler to properly validate form ID and entry ID.
  • Fixed typo in validation error message.
  • Updated tested compatibility to WordPress 6.9.

1.0.10

  • Preserve line breaks and formatting when replacing variables for rich text textarea fields using the replace_gwp_text_field_variables modifier.
  • Security fix: Sanitize decoded replacement values to avoid storing unsafe HTML in entries.
  • Security fix: Prevent admin-side XSS via unsanitized id parameter.

1.0.9

  • Fix an issue where & characters where being encoded.

1.0.8

  • Process nested shortcodes within the replace_gwp_text_field_variables shortcode.

1.0.7

  • Fix the merge tag selector for field mapping with custom values.

1.0.6

  • Fix an issue where the shortcode doesn't return a value.

1.0.5

  • Fix an issue with saving the enable shortcode setting.

1.0.4

  • Add a mergetag modifier and a shortcode to convert Text Field variable for display purposes.

Start using Text Field Variables today

Write template text once and fill in the details later

Buy now

30-day money-back guarantee

Proudly powered by WordPress