Skip to main content

Modifier: :rawurlencode

URL-encode (RFC 3986). Write it after a colon: {Field:1:rawurlencode}

About

Encodes spaces as %20 rather than +.

ProductGravityView
RequiresGravityView 2.29 or later
Works onform fields
In the pickerChange the output

How to use it

Pre-fill an email subject

Spaces become %20, which every email program reads correctly.

Write

<a href="mailto:[email protected]?subject=Question%20from%20{Full Name:1:rawurlencode}">Email us</a>

Get

<a href="mailto:[email protected]?subject=Question%20from%20ada%20Lovelace">Email us</a>

Examples

Rendered by real Gravity Forms and GravityKit PHP against a test entry.

Merge tagOutputWithout the modifier
{Contact Email:5:rawurlencode}ada%40example.com[email protected]

Where the merge tag picker offers it

Form fields: Single line text · Paragraph text · Email · Website · Hidden · Consent · Signature · Drop down · Radio buttons · Checkboxes, one choice · Multi select · Image choice · Multiple choice · Post category · Calculation · Product · Product (single) · Product (hidden) · Product price · Option · Shipping · Shipping (single) · Date, after a custom format · Time · Name, one part · Address, one part · Phone, standard format · File upload · Post image · List · Repeater.

Where it is left out

Field kindsWhy
Checkboxes · Name · AddressSkipped on the whole field. The field is stored as several values, and GravityView skips it. Write one input instead, like .3 for a first name.
Number · Quantity · TotalChanges nothing on this field. A number has no letters and is one word, so case changes, word limits and escaping leave it as it is.
DateNeeds a date format first. GravityView changes the stored date (2024-03-09), which has no letters. Add “Custom date format” or “Human-readable time difference” first.
Phone, international formatWorks on the stored record. An international phone field stores a record like {"country":"US",…}. GravityView would change that record, not the number people see.