Product icon

Text Field Variables for Gravity Forms

Define custom variables for Single Line Text and Paragraph Text fields.

v1.1.0 (30 March 2026)

Changelog

Changelog Text Field Variables for Gravity Forms

= 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.

Documentation

$49.00 (yearly, excl. VAT)

buy now

Text Field Variables lets you use custom placeholders inside Gravity Forms text fields, so you can write reusable template text once and replace the variables with real values later.

It is built for Single Line Text and Paragraph Text fields. You can use a simple variable format like **customer_name**, **company_name**, or any custom variable name that makes sense for your form. This makes it useful for letters, internal notes, customer messages, workflow text, and other reusable content that should not be rewritten manually.

Instead of storing one fixed block of text, you can create a flexible template and control how the final output is displayed or processed.

For workflow-based replacement, Text Field Variables can also work with Gravity Flow. When Gravity Flow is active, the add-on can appear as a workflow step, so variables can be replaced at the right point in your approval or review process.

Features

  • Custom Text Variables
    Create readable placeholders like **customer_name**, **company_name**, or **approval_note** inside supported Gravity Forms text fields.
  • Reusable Template Text
    Write template content once and reuse it across entries, messages, notes, letters, or display layouts. This helps reduce manual editing and keeps repeated text more consistent.
  • Works With Text Fields
    Use variables in Single Line Text and Paragraph Text fields. This keeps the add-on focused on text-based content where reusable placeholders make the most sense.
  • Field-Level Control
    Variables are not applied to every field automatically. You can enable variable support only on the fields where placeholders should be allowed.
  • Form-Level Variable Mapping
    Define variables per form from the Text Field Variables settings screen. This keeps each form’s variable setup separate and easier to manage.
  • Shortcode Output
    Display replaced template text on a WordPress page or shortcode-supported area using the add-on shortcode.
    Example:
    [replace_gwp_text_field_variables form_id="97" entry_id="999"]
    Dear customer_name,
    Welcome to company_name.
    [/replace_gwp_text_field_variables]
  • Merge Tag Modifier Support
    Use the Text Field Variables modifier when you need to replace variables for display purposes in supported merge tag contexts.
  • Gravity Flow Support
    Add variable replacement to a Gravity Flow workflow when Gravity Flow is installed. This is useful when placeholder text should only be replaced after a review, approval, or workflow step.
Text Field Variables settings for Gravity Forms custom placeholders
Define custom variables for a Gravity Forms text template and map them to reusable values.

FAQ – Text Field Variables for Gravity Forms

What does Text Field Variables do?

Text Field Variables lets you create custom placeholders inside supported Gravity Forms text fields. Those placeholders can then be replaced with real values when the content is displayed or processed.

Which Gravity Forms fields does it support?

The add-on is built for Single Line Text and Paragraph Text fields.

Where do I define the variables?

Variables are defined per form in Form Settings → Text Field Variables. You can create a variable name and assign the value that should replace it.

What format do variables use?

Variables use double asterisks, such as **customer_name**. If the variable name is added without the double asterisks, the add-on can wrap it automatically.

Can I display replaced text on a WordPress page?

Yes. The add-on includes the [replace_gwp_text_field_variables] shortcode, which can output the replaced version of your template text when shortcode conversion is enabled for the form.

Does Text Field Variables work with Gravity Flow?

Yes. When Gravity Flow is installed, Text Field Variables can appear as a workflow step. This allows you to replace variables during a workflow instead of handling everything immediately.

Is shortcode conversion safe to enable?

Shortcode conversion should be enabled carefully. Because shortcode output can use entry-based values, you should only enable it when the displayed data is safe for the intended audience and user permissions are properly managed.

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

No. Gravity Forms merge tags insert dynamic form, entry, user, or field values. Text Field Variables lets you create your own custom placeholders inside text fields and replace them later. They can work together, but they solve different problems.

Proudly powered by WordPress