Documentation

gwp_reverse

The gwp_reverse Gravity Forms Merge Tag Modifier reverses a text string.

:gwp_reverse

Example

{text:1:gwp_reverse}

Frequently Asked Questions

What does the gwp_reverse merge tag do in Gravity Forms?

 The gwp_reverse modifier reverses the order of characters in a text field. It uses PHP’s strrev() function behind the scenes, making it useful when you need to display strings backward like mirroring input for fun or validation.

{Text Field:1:gwp_reverse}

Where can I use the gwp_reverse modifier?

 You can safely use it in HTML fields, confirmation messages, and email notifications. It works well with field types that store text like Single Line Text and Paragraph Text because the output is purely string-based.

<p>Reversed text: {Paragraph:5:gwp_reverse}</p>

Do I need to pass any parameters when using gwp_reverse?

No. This modifier doesn’t require any parameters. Just place :gwp_reverse after your merge tag to reverse the field’s value.

{Custom Input:2:gwp_reverse}

How do I test if gwp_reverse is working properly?

 Add a Single Line Text field and an HTML block to your form. Inside the HTML field, use this to compare values:

<p>Original: {Text to Reverse:1}</p>
<p>Reversed: {Text to Reverse:1:gwp_reverse}</p>


Then preview and submit your form. If the reversed value displays correctly, the merge tag is working as expected.

Last updated: 21-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