☰

Premium Gravity Forms add-on

Advanced Merge Tags

Format, calculate and look up form data right inside your merge tags

Advanced Merge Tags is a Gravity Forms add-on that adds 22 modifiers and 16 merge tags. Change capitalization, format and shift dates, count or sum entries, read values from other forms and encrypt data in notifications, confirmations, GravityView and Gravity Flow, without writing PHP.

A translation quote: a word count and price update live while typing, and the confirmation shows a name typed in capitals in proper case, the company as a project code without accents, the price with VAT and a delivery date three working days ahead.

For Gravity Forms builders who want every email, confirmation and view to show exactly the right value.

No custom code

Formatting a date, capitalizing a name or counting entries normally needs a PHP snippet. Here you add a modifier to the merge tag and you are done.

Works wherever merge tags work

Notifications, confirmations, GravityView and Gravity Flow steps all understand the same modifiers, so you learn them once.

Combine and nest

Chain modifiers and put merge tags inside merge tags to build exactly the value you need.

Try it

This form runs Advanced Merge Tags on this site. Fill in the fields and see the add-on at work.

Use cases

  • Address customers by name in the right capitalization in every confirmation email.
  • Show a reply deadline three working days after submission with {gwp_date_created modify="+3 weekdays" format="d-m-Y"}.
  • Tell returning customers how many open tickets or earlier orders they have.
  • Build prefilled links to a follow-up form with URL-encoded values.
  • Filter a GravityView view on the logged-in user’s details with gwp_gview_advanced_filter.
  • Store sensitive values encrypted and only decrypt them where they are needed.

Features

  • Change text

    Change capitalization with gwp_case, add text before or after a value with gwp_append, and replace, shorten, reverse, clean up or censor text with gwp_replace, gwp_substring, gwp_reverse, gwp_remove_accents, gwp_sanitize and gwp_censor. Count characters and words with gwp_length and gwp_word_count; gwp_word_count and gwp_substring also work in calculation fields.

  • Format and shift dates

    Format any date, convert it to another timezone and move it by days, weeks or working days with gwp_date_format, gwp_date_created, gwp_date_updated and gwp_now. For example, show a deadline three working days after submission.

  • Count, sum and calculate

    Count matching entries with gwp_count_matched_entries, add up a field across entries with gwp_sum_matched_entries_values and calculate with gwp_calculate. Round results up, down or to a set number of decimals and show them as a number or currency.

  • Use values from other forms

    Look up a value in another form with gwp_get_matched_entry_value, for example a customer’s last order, or show several entries as a list or table with gwp_get_matched_entries_values. Filter and sort the matched entries, and choose per form or per field who may see the values.

  • Encode, encrypt and hash

    URL-encode and decode values for prefilled links with gwp_urlencode and gwp_urldecode, encrypt and decrypt with gwp_encrypt and gwp_decrypt, hash with gwp_hash and create unique codes with gwp_generate_token. Pass an encrypted entry ID in a link and show that entry’s values on the next page with gwp_eeid.

  • Work with JSON, users and the site

    Read a value from a JSON string with gwp_json_get, show a user’s role with gwp_user_role and apply modifiers to user and entry details with gwp_user and gwp_entry. Get the page URL or part of it, the parent page slug, a post ID or the current timestamp with gwp_url, gwp_parent_slug, gwp_post_id and gwp_current_timestamp.

Ready to use Advanced Merge Tags? 30-day money-back guarantee.

Buy now from $49

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 […] Particularly Advanced Merge tags have drastically reduced my reliance on things like nested forms […] SO much easier, more lightweight […]
Gravity Forms developer, freelance
I really, really appreciate all the time you spent on this, although I would argue that it has made your plugin even more powerful and more useful to everyone ;-)
Web developer, news publisher
Thank you for your suite of incredible tools. […] I will explore the advanced merge tags a bit more over these next days because I see some other use cases for us that could help in how we display important data.
Developer, nonprofit membership organization

More about GravityWP

Get Advanced Merge Tags

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

1 site

$49/year

Buy for 1 site

50 sites

$179/year

$3.58 per site
Includes priority support

Buy for 50 sites

All Access

$139/year

All 14 premium add-ons, 1 site
$9.93 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

Where can I use the modifiers?

Everywhere Gravity Forms replaces merge tags: notifications, confirmations, default values, GravityView views and Gravity Flow steps. Settings let you also use them in post content and in administrative text fields after submission.

Do I need to write code?

No. You add the modifier to the merge tag in the Gravity Forms editor, for example {Name:1:gwp_case to=upper}, and an optional setting shows an error message when a merge tag is set up wrong.

Can I combine several modifiers on one value?

Yes. Nested modifiers apply several changes in one merge tag, nested merge tags let you use other field values inside a modifier, and regular Gravity Forms modifiers such as :value still work after an advanced modifier.

Who can see values from other forms?

Lookups such as gwp_get_matched_entry_value only return values after you allow it in that form’s Advanced Merge Tags settings: no access, logged-in users, everyone, or a choice per field. Values for logged-in users also work in notifications and workflow steps that run later on a schedule.

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

ValueMerge tag with modifierResult
GravityWP{Example:1:gwp_case to=upper}GRAVITYWP
Café Entrepôt Façade{Text:1:gwp_remove_accents}Cafe Entrepot Facade
GravityWP Advanced Merge Tags{Text:1:gwp_word_count}4
GravityWP{Example:1:gwp_replace search="WP" replace="WordPress"}GravityWordPress
Café 50% off{Text:1:gwp_urlencode}Caf%C3%A9+50%25+off
client-1003{Customer:1:gwp_count_matched_entries form_id="2" match_id="1"}2

Every modifier and merge tag, with all its options, is explained in the documentation.

Requirements

  • Gravity Forms 2.4 or later
  • WordPress, tested up to 6.9
  • PHP 7.0 or later
  • Optional: GravityView and Gravity Flow, for modifiers in views and workflow steps
  • Optional: GravityKit Advanced Filters, for gwp_gview_advanced_filter in view filters
  • Optional: GP Populate Anything, for modifiers in templates that populate from Gravity Forms entries
  • Optional: GravityWP List Number Format, for gwp_word_count and gwp_substring in List field calculations

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

Documentation and tutorials

All Advanced Merge Tags documentation

Changelog of Advanced Merge Tags

v1.9.10

  • License and Update handler improvements

v1.9.9

  • License and Update handler improvements

v1.9.8

  • Fixed fatal ArgumentCountError when gwp_get_matched_entry_value is used as a nested modifier1, caused by gwp_process_nested_modifiers not forwarding the url_encode, esc_html and nl2br arguments introduced in 1.9.5.
  • Fixed a compatibility issue with GP Populate Anything.
  • Implemented automated unit tests.

1.9.7

  • Added support for `U_local` input format in gwp_date_format/gwp_date_field date parsing, so localized timestamps (such as `date_local_timestamp`) correctly honor `field_timezone`.

1.9.6

  • Added support returning formatted rich text in the gwp_get_matched_entry_value merge tag / modifier.
  • Fixed gwp_reverse to correctly handle multibyte characters (accented letters, emojis, CJK characters) by using a UTF-8-aware reversal instead of byte-level strrev.
  • Refactor merge tag formatting check to use rgar for better attribute retrieval

1.9.5

  • Added the format parameter to the gwp_get_matched_entry_value merge tag and modifier, which allows for formatting of the matched entry value.
  • Fixed a bug in pattern matching with nested modifiers.

1.9.4

  • Added 'raw', 'number_format' and 'thousand_sep' parameters for gwp_sum_matched_entries_values modifier to allow for different formatting and for use with gwp_calculate.

1.9.3

  • Allow access to matched entry values during a cron event.

1.9.2

  • Added support for gwp_substring and gwp_word_count modifiers when used in List Number Format calculations.

1.9.1

  • Fixed an issue introduced in 1.9, where nested mergetags in value filters where not converted.

1.9

  • Implemented enhanced sort_by argument for gwp_get_matched_* modifiers.
  • Optimized the processing of search filters for gwp_get_matched_* modifiers.
  • Fix gwp_eeid returning the whole field value when a sub field is requested (like 1.1, 1.2).
  • Minor code quality improvements.

1.8.5

  • Added wp_strip_all_tags to gwp_sanitize modifier.
  • Fix a fatal error when GravityView was deactivated when GravityView Andvanced Filter extension is still active.

1.8.4

  • Fix gwp_get_matched_entries_values getting a maximum of 20 entries.

1.8.3

  • Improved performance of the gwp_generate_token unique check.

1.8.2

  • Allow nested merge tags for timezone parameters.

1.8.1

  • Fix an issue where the gwp_hash modifier wasn't converted.

1.8

  • Implemented gwp_hash merge tag.

1.7.3

  • Added option to round to floor or ceil in gwp_calculate merge tag.

1.7.2

  • Fixed gwp_calculate's default number_format parameter value being 'decimal_point', which doesn't work and should be 'decimal_dot'.
  • Added decimals parameter to gwp_calculate, to allow rounding.
  • Added raw parameter to gwp_calculate.

1.7.1

  • Added more features to *gwp_generate_token*.

1.7

  • Implemented *gwp_calculate* merge tag.
  • Implemented gwp_censor modifier.

1.6.3

  • Fixed an issue where the gwp_get_matched_entry_value merge tag applies newline characters to html breaks twice in confirmation messages.

1.6.2

  • Fixed an issue regarding the frequency of update checks to increase performance.

1.6.1

  • Fix PHP error when using Gravity View Advanced Filter with roles.

1.6.0

  • Update the license handler.

1.5.2

  • Added absint option to gwp_sanitize.
  • Implemented gwp_json_get modifier.
  • Fix advanced merge tag modifiers with quoted parameters not working when used in the post content.

1.5.1

  • Implemented *gwp_get_matched_entry_value* merge tag.
  • Implemented *gwp_gview_advanced_filter* merge tag for generating filter conditions for GravityKit Advanced Filters.
  • Change gwp_get_matched_entries_value 'value' parameter to 'return_value' to allow filter parameters such as 'filter1', 'operator1', and 'value1'. If no 'return_value' parameter is found it will fallback to 'value' to maintain backwards compatibility.
  • Fix some potential PHP warnings.

1.5

  • Implemented *gwp_post_id* merge tag.
  • Implemented *gwp_user* mergetag, which is similar to the GF *user* merge tag, but allows to use advanced modifiers on the output.
  • Implemented *gwp_entry* merge tag, which supports advanced modifiers on entry properties like id and status. Usage example: *gwp_entry:id:gwp_count_matched_entries form_id="2" match_id='1'*.
  • Implemented *gwp_eeid* merge tag, which allows to get entry properties / field values from the encrypted entry-id passed in the eeid url parameter. Supports regular and advanced modifiers. Example *gwp_eeid:5*, *gwp_eeid:status*
  • Implemented gwp_user_role modifier.
  • Implemented gwp_encrypt modifier.
  • Implemented gwp_decrypt modifier.
  • Implemented gwp_sanitize modifier.
  • Added support for usage of entry related merge tags and modifiers in Gravity Perks Populate Anything's custom choice / value templates.
  • Added return_format=multiselect parameter to the gwp_get_matched_entries_values modifier.
  • Added plugin option to replace merge tags in post content.
  • Other minor improvements.

1.4.3

  • Improved security by applying wp_kses_post on gwp_get_matched_entries_values output.
  • Added support for textual separators in gwp_get_matched_entries_values output. New parameters: row_separator and col_separator.
  • Added support for a no-result message in gwp_get_matched_entries_values output. New parameters: no_result.
  • Fixed a bug in gwp_get_matched_entries_values where the row_tag parameter was used for the row class.

1.4.2

  • Add the 'gwp_amt_replace_admin_field_variables' filter to allow conversion of field merge tags in administrative field's default value, for other field types than 'text'.

1.4.1

  • Fix compatibility issue with GP Populate Anything Live Merge Tags, where nested merge tag modifier arguments are passed with html encoded quotes.

1.4

  • Feature: Implemented support for regular GF modifiers after the advanced modifier. Example *DropdownSelect:1:gwp_substring:value start=1 length=2*.
  • Feature: It is now possible to use *DropdownSelect:1:gwp_substring start=-3* in calculations. This will use the last 3 characters from a value like 'first_choice_1.4'.
  • Feature: Added gwp_url merge tag.
  • Performance improvements.

1.3

  • Feature: Added gwp_generate_token merge tag.
  • Feature: Added gwp_now merge tag.
  • Feature: Added gwp_sum_matched_entries_values modifier, which allows to add up numeric values from a field for a large batch of entries.
  • Feature: it is now possible to use *text:1:gwp_word_count* in calculations.
  • Fix fatal error when gwp_date_created and gwp_date_updated merge tags are used before the entry was created.

1.2.4

  • Update dependencies to fix a security issue in a third party library.

1.2.3

  • Added support for use of the gwp_word_count merge tag modifier with tinymce/RTF textarea fields.

1.2.2

  • Fix nested merge tags within gwp_append and gwp_replace modifiers not working properly.

1.2.1

  • Improvement: gwp_urlencode modifier now supports checkboxes.

1.2

  • Added gwp_substring modifier.
  • Added gwp_date_format modifier. This deprecates the gwp_date_field merge tag.
  • Added support for using nested merge tags within merge tags with search filters, like filter1=created_by operator1=is value1=*|user:ID|*.
  • Search filters with invalid operators are now ignored.
  • Added support for using nested merge tags within gwp_date-* merge tags and modifiers like modify='+*|number of weeks:2|* weeks'.
  • Added support for using nested merge tags within gwp_append and gwp_replace modifiers like *Textarea:1:gwp_replace search='VARIABLE' replace='*|text:2|*'*.
  • Added plugin setting to replace field merge tags like *field:1* in text fields with administrative visibility after an entry is submitted.
  • Fix subfield values not working with advanced merge tags modifiers.
  • Apply newline to <br> conversion when outputting to html context.
  • Reworked the method for gwp_word_count modifier as str_word_count() does not work as expected in various cases. Words are now counted based on separator characters. By default: Any whitespace character (spaces, tabs, line breaks).
  • Added 'gravitywp_advancedmergetags_wordcount_regex' and 'gravitywp_advancedmergetags_wordcount_result' filters.
  • Added required argument checks for gwp_datefield merge tag / modifier.
  • Improved handling of missing empty arguments in gwp_get_matched_entries_values and gwp_datefield modifier.
  • Security improvements.

1.1.1

  • Fix issue when using timezone argument.

1.1

  • Added support for Merge Tag modifiers with case sensitive arguments.
  • New Merge Tag modifier: gwp_append - Append a string before or after a non-empty value.
  • New Merge Tag modifier: gwp_replace - Search and replace a value before output.
  • Fix some PHP notices.

1.0

  • All new.

Start using Advanced Merge Tags today

Format, calculate and look up form data right inside your merge tags

Buy now from $49

30-day money-back guarantee

Proudly powered by WordPress