Skip to main content

Modifier :rawurlencode

URL-encode (RFC 3986). Example: {Company:101:rawurlencode} gives Acme%20Widgets%20%26%20Co.%20%3Cb%3ENorth%3C%2Fb%3E%20Branch%2C%20serving%20the%20%22Tri-County%22%20area%20since%201923. On the test form, this field is {Company:101} (Single line text).

About

Like urlencode, but spaces become %20, not +.

Works in any merge tag while GravityView is active, including Gravity Forms notifications.

ProductGravityView
RequiresGravityView 2.49 or later
In the pickerChange the output, for form fields

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

Output from the real plugin code, run on a test entry.

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

Works on

Form fields: Single line text · Paragraph text · Email · Website · Hidden · Signature · Drop down · Radio buttons · Checkboxes, one choice · Multi select · Image choice · Multiple choice · Post category · Product · 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.

Left out

Field kindsWhy
Consent · Calculation · Product (single) · Product (hidden) · Name · AddressOutputs nothing on the whole field. Gravity Forms has no single value for this field as a whole, so the tag outputs nothing and so does any modifier. Use one part instead, like .3 for a first name.
Checkboxes · RepeaterSkipped on the whole field. This field is stored as several values, which GravityView skips and GravityMath cannot total. Use one input instead, like .3 for a first name.
Number · Quantity · TotalChanges nothing on this field. It leaves this field as it is: a number has no letters and is one word, and a repeater is shown as a table these steps do not change.
DateNeeds a date format first. GravityView would change the stored date (2024-03-19), which has no letters. Add “Custom date format” or “Relative time” 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.