Do you want to append a string of text (or characters) before and after the Merge Tag output and keep it empty if the field is empty? With the gwp_append Merge Tag Modifier from Advanced Merge Tags you can do that. We’ll walk you through it step by step.
Adding text before Merge Tag output
To add text at the beginning of the Merge Tag output, use the following Merge Tag Modifier:
{Organization:1:gwp_append before=" - "}
Client example: We have a client with Forms that have a Gravity Forms Single Line Text Field where site visitors can enter their organization. This field is not required, because not everybody is part of an organization. In the e-mail that is send we want to add the organisation to the Subject of the e-mail. In case there is an organization filled in, we want to add a space, a dash and another space in front of the output. With the above modifier, we can do that. There will be no dash in case there is no value available.
Adding text after the Merge Tag output
There are also cases where you want to add something after the output, for example adding some kind of metrics or even a whole string in case something is filled in. You can do that like this:
{Organization:1:gwp_append after=" MWh"}
This will output the value (for example a number) and adds the abbreviation of megawatt hour to the output, if the field value is not empty.
Adding text both before and after the Merge Tag ouput
You can also add both text before and after the Merge Tag ouput of the Gravity Forms field. This examples adds a dash in front of the ouput and a dash after the ouput and will only show if there is a value filled in.
{Organization:1:gwp_append before=" - " after=" - "}
Try it in the demo
Our Premium add-ons for Gravity Forms
List Text
Add features like textarea, placeholder and custom validation to a column or multiple columns in a Gravity Forms List Field.
Advanced Merge Tags
This Gravity Forms Add-On adds extra Merge Tag modifiers (and a lot of power). From the most common used functions like capitalize and length to changing date formats.
DateTime Field
The GravityWP - DateTime Field add-on adds a dedicated Date/Time field to Gravity Forms so users can enter both a date and a time in a single input.
List Number Format
With this Gravity Forms Add-on you can change List Field columns into a number field, do calculations within a row or column. Extra merge tags are available with total counts of columns.
Read tutorials about
Gravity Forms Airtable Integration: Create Records From Form Submissions
Learn how to build a Gravity Forms Airtable integration with GravityWP API Connector. Send form submissions to Airtable, create new records automatically, and save the returned Airtable Record ID and response back to Gravity Forms.
Gravity Forms Asana Integration: Create Tasks From Form Submissions
Learn how to connect Gravity Forms to Asana with GravityWP API Connector. This tested workflow creates Asana tasks from form submissions and saves the returned task ID and URL back to Gravity Forms.
Gravity Forms Google Calendar Integration: Create Events From Form Submissions
Connect Gravity Forms to Google Calendar with GravityWP API Connector. Learn how to create calendar events from form submissions, map event details, configure OAuth 2.0, handle time zones, and save the returned Event ID and URL.
Gravity Forms Notion Integration: Create Database Pages Without Zapier
Connect Gravity Forms to Notion without Zapier. This tested tutorial shows how to create Notion database pages from form submissions and save the returned page ID, URL, creation time, and API response.