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.
:gwp_append before="" after=""
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.
Last updated: 03-12-2022