Do you want to return a portion of a Merge Tag string output? And specify an offset and length of the part of the Merge Tag output? With Advanced Merge Tags it’s as easy as it gets.
Using the gwp_substring Modifier for Gravity Forms
With the gwp_substring Modifier for Gravity Forms Merge Tags it’s possible to return a part of value (a substring of the original string). You can use the modifier like this:
:gwp_substring start= length=
The modifier has two arguments:
- start: how many characters should it skip when using a positive value / where does the substring start. When using a negative value (for example -3), the substring will start the number of characters before the end of the value.
- length: how many characters should be in the substring / what is the length of the substring.
Try it yourself
Example gwp_substring
This example gives back a substring of the value in the Gravity Forms field ‘String’ (with Field ID 1). It skips the first two characters and gives back 3 characters:
{String:1:gwp_substring start=2 length=3}
Offset from the end of the string
When using a negative value for the start of the substring (for example start=-3), the substring will start 3 characters before the end of the value (string).
{String:1:gwp_substring start=-3 length=1}
Examples offset and length
| s | u | b | s | t | r | i | n | g |
|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| Merge Tag & Modifier | Output |
|---|---|
{String:1} | substring |
{String:1:gwp_substring length=3} | sub |
{String:1:gwp_substring start=3 length=3} | str |
{String:1:gwp_substring start=-3} | ing |
{String:1:gwp_substring start=-3 length=1} | i |
Read tutorials about
n8n vs Zapier: Which Automation Tool Actually Fits Your Work?
Trying to decide between n8n vs Zapier? This article breaks down pricing, hosting, integrations, AI features, and where self-hosted n8n on a cheap VPS can beat Zapier’s task-based plans. You’ll also see how Gravity Forms users can plug in the GravityWP n8n Connector and move key workflows off Zapier without rebuilding their forms.
Cloudflare Tunnel + n8n: Expose Local n8n for Webhook Testing (Dev Only)
This guide shows how to use Cloudflare Tunnel Quick Tunnels to put a local n8n instance on the internet for real webhook testing. It’s a dev-only recipe that lets tools like GravityWP’s n8n Connector call your local n8n over HTTPS, without renting a VPS or opening ports.
Self-Host n8n with Docker on a VPS
Learn how to self-host n8n with Docker on a VPS using a production-ready setup. This step-by-step guide walks you through configuring Docker Compose, Postgres, HTTPS, and WEBHOOK_URL so you can run reliable, secure n8n workflows on your own server.
One-Click n8n Hosting: How to Deploy n8n with Railway, Elestio & Coolify
Learn how one-click n8n hosting works on platforms like Railway, Elestio, and Coolify. This guide explains when to pick one-click hosting over n8n Cloud or a raw VPS, how templates are structured, and which env vars, security settings, and troubleshooting tips you can’t skip.