Documentation

gwp_encrypt

The gwp_encrypt modifier for Gravity Forms merge tags enables the encryption of field values or any content using OpenSSL encryption. This feature allows for secure transmission or storage of sensitive information.

Usage

The basic syntax for the gwp_encrypt modifier is as follows:

{field:X:gwp_encrypt}

Where X is the field ID whose value you wish to encrypt. The encrypted result is URL-safe, making it suitable for use in URLs or web forms without further encoding.

Attributes

The gwp_encrypt modifier does not require any additional attributes. Its primary function is to encrypt the value of the specified field or content.

Example Usage

  • To encrypt the value of field ID 3: {field:3:gwp_encrypt}
  • To pass an entry by url for use with gwp_eeid, encrypt the id of the entry like this: {gwp_entry:id:gwp_encrypt}

Security Note

While gwp_encrypt provides a layer of security by encrypting content, it is essential to handle the encrypted data carefully.

Additional Information

Encrypted values are returned in a URL-safe base64-encoded format. This ensures compatibility with web forms and URLs without the need for additional encoding steps.

Frequently Asked Questions

How do I encrypt a field value in Gravity Forms?

The gwp_encrypt modifier lets you automatically encrypt a field’s value on form submission. It’s especially useful when storing sensitive data like secret messages or IDs.
To use it, set the default value of a Single Line Text field to reference another field with :gwp_encrypt.

Example:
{Enter Something:5:gwp_encrypt}

This takes the value from Field ID 5 and stores its encrypted version in the field using this merge tag.

Which field types support the gwp_encrypt modifier?

The gwp_encrypt modifier works directly inside Administrative Single Line Text fields as a default value. If you want to use it with Paragraph Text or other field types, you’ll need an Update Entry step using Gravity Flow.

Example:
{yourfield:ID:gwp_encrypt}

To apply it to a Paragraph Text field, use a Gravity Flow “Update an Entry” step after form submission.

How can I encrypt a secret message using Workflow?

If your field type doesn’t support merge tags in default values (like Paragraph Text), you can use Gravity Flow to encrypt values dynamically after submission.

1.Add a Workflow step of type “Update an Entry.”

2.Set the target field’s value to: {Your Secret Message:3:gwp_encrypt}

3.Gravity Flow will store the encrypted version of the message in your chosen field.


Works with any text-based field
Keeps your form logic clean and secure
Requires the paid Gravity Flow plugin

Can I show the encrypted value on a page?

Yes, as long as the merge tag with gwp_encrypt has been executed (either as a default value or via Workflow), you can use the field merge tag anywhere Gravity Forms allows it: confirmations, notifications, or pages using shortcodes.

Example:
{Encrypted Message:6}

This will display the encrypted string in frontend confirmations or dynamic content pages (like a GravityView template).

Can I pass encrypted data through a Redirect URL?

Absolutely. You can use the gwp_encrypt modifier inside a Redirect Confirmation’s URL to securely pass encrypted entry data via query string.

Example:
https://example.com/secret-page/?eeid={gwp_entry:id:gwp_encrypt}

This setup encrypts the current entry’s ID and appends it as eeid in the URL. On the destination page, you can safely use that encrypted ID to fetch or display secure content.
Keeps entry data private
Ideal for secret message workflows
Prevents manual entry ID tampering

Last updated: 18-07-2025

Advanced Merge Tagsv1.9.3

To use the functionalities described in this documentation, you'll need to get the GravityWP - Advanced Merge Tags add-on.

Read more