Gravity Forms Post Content Merge Tags
Use Gravity Forms merge tags directly in your WordPress post content. Now you can use a single confirmation page for multiple forms, better style and layout your confirmation pages, and generate persistent confirmation pages.
What does it do?
This plugin provides the ability to include Gravity Forms merge tags in your WordPress post content. The uses are endless but here are a few of the most common.
Reclaim complete control over the styling of the redirect page while maintaining the ability to use Gravity Forms merge tags in the content of the page.
Reuse the same confirmation page for multiple forms. For instance, you might have 25 forms on your site but would like to redirect users from all of those forms to a single, personalized “Thank You” page on submission.
Implement persistent confirmation pages. For example, you could send the user an email including the confirmation page URL to their form submission, which they could save for future reference.
Features
- All Gravity Forms Merge Tags supported.
Works with all default Gravity Forms merge tags out of the box. - Merge Tag button on Post Editor.
Awesome new Merge Tag Button right in the Post Editor toolbar to allow you to quickly insert the merge tags you want directly into your post content. - All Custom Post Types supported.
Merge tags can be used with any post type. - Global Merge Tags.
Use simplified global merge tags to match fields across multiple forms. - Handy [eid] shortcode.
Display entry data anywhere shortcodes are supported. - Pretty Entry ID.
Use {pretty_entry_id} to insert ID. A safe and pretty way to pass entry data. - Secure URLs.
Confirmation page URLs are encrypted to protect your entry data. - Seamless, easy-to-use UI.
Integrates directly with the Gravity Forms confirmation settings. Activate functionality with a single click. - Automatic updates.
Get updates and latest features right in your dashboard. - Awesome support.
We’re here to help! And we mean it.
Documentation
How do I enable this functionality?
After installing and activating Gravity Forms Post Content Merge Tags, you can enable Post Content Merge Tags in Gravity Forms Confirmations. Let’s step through that process.
You can use GF Post Content Merge Tags for the “Redirect” Confirmation Type as well; however, you will need to configure the URL manually.
Awesome! Now you’re ready to see it all in action. Go submit your form. When you’re redirected, you’ll notice that your encrypted entry ID has automatically been appended the redirect URL and all of the merge tags in your post content have been replaced with the entry data (which was just submitted).
Feature Details
Merge Tag Button
When enabled, the Merge Tag Button will appear in the toolbar for the visual post content editor. To enable the Merge Tag Button, you must first activate Post Content Merge Tags for the post/page you for which you would like to insert merge tags. You can do this by selecting the page as the confirmation page for any form, enabling the Post Content Merge Tags setting, and then accessing the page via the Edit Page Content link that appears.By default, a list of merge tags will appear specific to the form from which you accessed the Edit Page Content link. If you would like to add merge tags from other forms, select the View All Forms menu item. This will refresh the menu with a list of all forms. Select your desired form and the menu will be refreshed with a list of merge tags specific to the selected form.
Usage Examples
Global Merge Tags
By default, merge tags are field-specific. They are matched by the ID (i.e. {My Label:12}
). Global merge tags allow merge tags to be matched based on the label. This means they can match fields from any form.
You can show a merge tag’s value instead of label by adding :value
to the end of the merge tag. For example:
{My Label:12:value}
With global merge tags, you can use the same confirmation page for multiple forms while still including personalized information for the submitting user via Gravity Forms merge tags. Check out this article for more details.
Usage Examples
The {encrypted_entry_id} Merge Tag
The {encrypted_entry_id}
merge tag allows you to pass the entry ID to another location, without directly displaying the form’s entry ID.
Because of this merge tag, passing entry details over to other locations such as confirmation redirect destinations is a breeze. Simply passing the {encrypted_entry_id}
tag within your confirmation settings allows you to dynamically pass the entry ID without the need for any custom configuration.
The {confirmation_url} Merge Tag
The {confirmation_url}
merge tag allows you to output the confirmation URL that the user is sent to after submitting your form. By utilizing this merge tag, the confirmation URL is easily accessible at a later date, if needed.
The {pretty_entry_id} Merge Tag
Used in the same cases as {encrypted_entry_id}
, the {pretty_entry_id}
merge tag obfuscates the Entry ID for safety, but the resulting ID is shorter and readable than encryption.
Compare:
- Entry ID:
156 - Encrypted Entry ID:
2kG%2BuDJS7fpR0ypGiHIagVXYYKnEtN%2Bp1rYV5zODPHU%3D - Pretty Entry ID:
80d57d
This feature is enabled by default.
The [eid] Shortcode
Post Content Merge Tags relies on a special WordPress filter, the_content() that is applied to the post content before it is rendered.
You may want to use merge tags in content that is not processed through this filter. We’ve added the [eid]
shortcode to help with these use-cases. Even if the content is not run through the content filter, it is very likely still parsed for shortcode.
In combination with the Shortcode Widget plugin, shortcodes can be placed within widget areas. Doing so will allow you to place Gravity Forms merge tags within sidebars of your site, or any other widget area available to you.
Basic Usage
[eid]Hello, {Name (First)} {Name (Last)}[/eid]
Simply wrap your merge tag content within the [eid] shortcode. The content will be parsed for merge tags when shortcodes are processed.
Field Attribute Usage
Hello, [eid field="1.3" /]
Don’t feel like writing out the full merge tag and you know the field ID? You can specify the field ID via the field attribute.
Tag Attribute Usage
Hello, [eid tag="{Name (First)}" /]
If you want your merge tag to be processed directly from within the shortcode, you can use the tag attribute.
The tag attribute displays the merge tag’s label when used with the
eid
shortcode.Shortcode in HTML Attribute
[eid]->Insert Image Here<-[/eid]
WordPress no longer supports shortcodes within HTML attributes. Just include the full HTML tag (along with the merge tag) and the [eid] shortcode will handle the rest.
Advanced Configuration
Parsing Merge Tags for “Redirect” Confirmation Type
Post Content Merge Tags supports all post types out of the box; however, Gravity Forms does not support selecting a post from a custom post type via the Confirmation UI. To activate Post Content Merge Tags for other post types, select Redirect for Your Confirmation Type and append eid
Parameter to the Query String.
Default Edit URL
http://local.dev/wp-admin/post.php?post=8043&action=edit
Edit URL with “form_id” Parameter
http://local.dev/wp-admin/post.php?post=8043&action=edit&form_id=123
Global Usage
Post Content Merge Tags will attempt to parse merge tags in any content filtered through the_content()
filter. You can append an eid
to any WordPress URL and the merge tags will be replaced where the_content()
filter is applied.
Known Limitations
Merge Tags might not work when used on page built with a visual page builder plugin, in that case, you must use the [eid]
shortcode.
Hooks
Gravity Forms has hundreds of hooks. Check out our Gravity Forms Hook Reference for the most thorough guide to Gravity Forms’ many actions and filters.
Related Resources
- How to Create Personalized Confirmation Pages
Finally, there is an easy way to create dynamic Gravity Forms confirmation pages for multiple forms, create permalinks for confirmation pages, and pass entry IDs anywhere. Thanks to GP Post Content Merge Tags, Gravity Forms confirmations are more powerful than ever! - Use Gravity Forms Merge Tags in Your Post Content
Adds support for Gravity Form merge tags in your post content enabling the use of a single confirmation page for multiple forms, more control over the styling and layout of your confirmation pages, and persistent confirmation pages.