Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

  • Gravity Perks
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    • Documentation
    • Support
    • Account

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.

This plugin is part of the Gravity Perks package. Buy Gravity Perks today to get this perk plus 29 other galactic Gravity Forms plugins!

View Demo Get Gravity Perks
gp-post-content-merge-tags-featured

What does it do?

GP Post Content Merge Tags 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 does this functionality work?

    When a user submits your form, the entry ID will be encrypted and automatically appended to the confirmation URL. This encrypted entry ID will be used to retrieve the full entry and parse all merge tags in the confirmation page.

    How do I enable this functionality?

    This plugin requires Gravity Forms 2.0 or greater. The following instructions assume you have Gravity Perks and GP Post Content Merge Tags installed and activated.

    1. Navigate to the Confirmations page for any form.

    2. Select “Page” for the Confirmation Type setting and select your desired confirmation page from the “Page” setting.

      gp-post-content-merge-tags-confirmation-default

      Note: You can use GP Post Content Merge Tags for the “Redirect” Confirmation Type as well; however, you will need to configure the URL manually. More details below.

    3. Click on the “Enable Merge Tags in Page Content” checkbox to enable merge tags for your selected confirmation page.

      gp-post-content-merge-tags-confirmation-settings
    4. Click the “Save Confirmation” button to save your confirmation.

    5. Click the “Edit Page Content” link that displays next to the “Enable Merge Tags in Page Content” to edit your confirmation page.

      gp-post-content-merge-tags-edit-page-content
    6. Select the Merge Tag Button to insert Gravity Forms merge tags into your post content.

      gp-post-content-merge-tags-button

      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).

      gp-post-content-merge-tags-frontend

    Feature Details

    Merge Tag Button

    gp-post-content-merge-tags-button

    gp-post-content-merge-tags-edit-page-content
    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.


    Global Merge Tags

    gp-post-content-merge-tags-samplegp-post-content-merge-tags-field-specificRollover to View Field Specific 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.

    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. Read our How to create personalized confirmation pages for more details


    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

    To activate this feature, do the following.

    1. Go to the WordPress theme editor by selecting “Appearance” → “Editor”.
    2. Select functions.php from the list of files on the right.
    3. Paste the following line to the end of the opened file. add_filter( 'gppcmt_enable_pretty_id', '__return_true' );
    4. Save the file.

    The [eid] Shortcode

    GP 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.

    • Shortcode in HTML Attribute

      [eid]<img src="http://mysite.com/images/{Product Type}.jpg" />[/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

    GP 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, you will need to do the following.

    1. Select “Redirect” for Your Confirmation Type.

      gp-post-content-merge-tags-redirect-confirmation
    2. Append “eid” Parameter to Your Query String.

      gp-post-content-merge-tags-confirmation-redirect-query-string
    3. (optional) Activate Merge Tag Button.

      gp-post-content-merge-tags-button
      The merge tag button makes inserting merge tags in your post content so much easier. To activate for custom post types, you will need to append a “form_id” parameter to the query string of the edit page with your desired form ID. Once the button has been activated for a post, it will always be available for that post.

      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
    GP 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.

     


    Hooks

    • gppcmt_encrypt_eid

    Use Case

    How to Populate Entry Data from One Form into Another Using Gravity Forms – This example demonstrates how you can pass entered values from one form to the next. Merge tags are used to automatically populate specific fields on your form.

    Did this resource help you do something awesome with Gravity Forms? Then you'll absolutely love Gravity Perks; a package of 23 Gravity Forms plugins with premium support.

    • View All Perks
    • Buy Gravity Perks

    Perk Deets

    • Version 1.1.5
    • Updated April 9, 2018
    • Released December 26, 2016
    • View Changelog

    1.1.5

    • Fixed compatibility change for Gravity Forms 2.3 column name.

    1.1.4

    • Added support for using merge tag modifiers on global merge tags (i.e. {Field Label:value}).

    1.1.3

    • Added compatibility fix for Gravity Forms 2.3.

    1.1.2

    • If Pretty ID and encryption is disabled for eids, the eid will be checked against the current user ID as well as the current visitor IP before display the contents.

    1.1.1

    • Added support for 'gppct_always_process_merge_tags' filter to allow always processing merge tags; even when no eid is passed.

    1.1

    • Enabled Pretty ID by default for eids. To disable add this to your theme's functions.php file: add_filter( 'gppcmt_enable_pretty_id', '__return_false' );
    • Fixed deprecation issue with the use of GFCommon::encrypt() and GFCommon::decrypt() functions which have been deprecated in Gravity Forms 2.3.

    1.0.5

    • Fixed issue where Confirmation URL in Entry details metabox displayed awkwardly when other custom items were included in the metabox.

    1.0.4

    • Fixed issue where spaces in the confirmation URL parameters were replaced with underscores.

    1.0.3

    • Added logging to get_entry() method.

    1.0.2

    • Added support for processing pre-population merge tags in the [noeid] shortcode.

    1.0.1

    • Fixed issue where required GF script (gravityforms.js) did not load if another GF script (form_admin.js) was already enqueued.

    1.0

    • Added support for "pretty id". When enabled, eid parameter will be a 6 character alphanumeric string.

    1.0.beta1.7

    • Added support for [noeid] merge tag. Contents are displayed when no entry is available.

    1.0.beta1.6

    • Added support for not displaying any content within the [eid] merge tag if no entry is found.

    1.0.beta1.5

    • Fixed error introduced by WordPress 4.7.2 where merge tag selector failed to insert merge tag.

    1.0.beta1.4

    • Fixed error in FireFox which prevented merge tag selector from loading in Post Edit view.
    • Updated merge tag selector to truncate field labels to 40 characters.

    1.0.beta1.3

    • Fixed issue where anonymous functions are not supported by earlier PHP versions.

    1.0.beta1.2

    • Fixed conflict with ACF where merge tag selector on the post edit view was not working.

    1.0.beta1.1

    • Added support for processing pre-population merge tags without eid parameter

    All Perks

    • GF Auto Login
    • GF Better User Activation
    • GF Blacklist
    • GF Conditional Logic Dates
    • GF Conditional Pricing
    • GF Copy Cat
    • GF Disable Entry Creation
    • GF eCommerce Fields
    • GF Email Users
    • GF Expand Textareas
    • GF Limit Checkboxes
    • GF Limit Choices
    • GF Limit Dates
    • GF Limit Submissions
    • GF Live Preview
    • GF Media Library
    • GF Multi-page Navigation
    • GF Nested Forms
    • GF Pay Per Word
    • GF PayPal One-time Fee
    • GF Placeholder
    • GF Post Content Merge Tags
    • GF Preview Submission
    • GF Price Range
    • GF Read Only
    • GF Reload Form
    • GF Terms Of Service
    • GF Unique ID
    • GF Word Count

    Copyright © 2018 · Powered by WordPress · Gravity Wiz LLC · Log out

    • Support
    • Affiliates
    • About