gwp_append
With the gwp_append Merge Tag Modifier for Gravity Forms you can append a string before and/or after the field value, but only if the field value is not empty.
If you want to change the output of a Merge Tag text, use the Modifier like this:
Example | Modifier | Output | Info |
---|---|---|---|
{Example:1} | WP | Value of the field is βWPβ | |
{Example:1:gwp_append before="Gravity" after=" is great"} | :gwp_append before="Gravity" after=" is great" | GravityWP is great | Modifier adds βGravityβ before and β is greatβ after the value βWPβ |
{Example:2} (empty field value) | Value is empty | ||
{Example:2:gwp_append before="Gravity" after=" is great"} | :gwp_append before="Gravity" after=" is great" | Modifier doesnβt append, because the value is empty |
Try the demo
Check also the tutorial Append text before or after Gravity Forms Merge Tag if not empty.
Frequently Asked Questions
The gwp_append modifier allows you to add custom text before and/or after the value of a field in Gravity Forms. This text will only appear if the field has a value. If the field is empty, no output is shown.
You can use this modifier in confirmation messages, notification emails, or any other place where merge tags are supported.
Example:{First Name:1:gwp_append before="Hello " after=", welcome!"}
If the user enters:
Jon
The output will be:
Hello Jon, welcome!
If the field is empty, gwp_append does not display anything neither the before nor after text will be shown.
Example:{Company:2:gwp_append before="Company: " after=" Ltd."}
If Company is empty β no output.
Yes, you can use only before=ββ¦β, only after=ββ¦β, or both together.
Example only after:{Age:3:gwp_append after=" years old"}
If user enters 25 β shows:
25 years old
Yes. You can include special characters, punctuation, or emojis in the before or after text.
Example:{Name:1:gwp_append before="π " after=" is awesome! π"}
If user enters Jon β shows:
π Jon is awesome! π
You can use it in any part of Gravity Forms that supports merge tags, such as:
-Confirmation messages
-Notification emails
-HTML fields in forms or pages
GravityView templates (if merge tags are supported there)
Example in a confirmation message:{First Name:1:gwp_append before="Hello " after=", welcome to our site!"}
First Name = Field label
1 = Field ID
gwp_append = merge tag modifier
Last updated: 21-07-2025