Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

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

How to Use Merge Tags in Field Labels with Gravity Forms

An easy method to use most Gravity Forms merge tags in your field labels.

Last updated July 29, 2020 | Written by Jordan Smith

View Demo

This article requires the GP Populate Anything perk. Buy Gravity Perks today to get this perk plus 33 other premium Gravity Forms plugins!

  • View the Plugin
  • Buy Gravity Perks

GF Populate Anything is most commonly used to populate choices and values into a field.

Did you know it can also be used to replace merge tags in field labels?

In this article, we’ll demonstrate how to create Drop Down field on the first page of a form and how to populate the selected value of that Drop Down into the label of a Product field. This functionality can be applied to any field type.

Steps

  1. Create the Form
  2. Add Live Merge Tag to Field Label
  3. View Form and Confirm

1. Create the Form

Let’s start by creating our form. For this article, we’ll be creating a simple three-page donation form.

On page one, we add a Name field and a Drop Down field with a list of non-profit organizations. On page two, we add a Product field and set it to “User Defined Price.” The final page is optional but demonstrates how GF Preview Submission can be used to give a full preview of the entry before it is submitted.

2. Add Live Merge Tag to Field Label

We want to display the selected value from the organizations drop down on the first page in the label of the User Defined Product field on the second page.

Since merge tags are not supported in field labels by default, we won’t have access to the handy merge tag button that appears next to merge-tag-supported settings.

Don’t worry. It’s easy to write merge tags by hand. All you need is the field or input ID. If you want to include the label as well for easier identification, you can, but it is optional.

Here’s what our field label looks like with the merge tag in place:

Add Live merge Tag to Field LabelAdd Merge Tag to Field Label
Note the @ symbol in front of the merge tag. This is what makes it a Live Merge Tag.

Remember, the merge tag in the screenshot is specific to our demo form. You will need to write your own merge tag based on the Drop Down field you created on the first page.

3. View Form and Confirm

Let’s make sure everything is working as expected.

Open your form in Preview (or Live Preview). Select an organization from our drop down and submit the first page.

select-donation-recipientSelect an Organization

On the second page, you should see that our merge tag has been replaced in the Product field label.

enter-donation-amountView Donation Recipient in Label

On the last page, we can confirm the donation recipient and amount are correct before submitting the form.

preview-submission-donation-infoConfirm Donation Recipient and Amount

What questions do you still have?

Do you still have any questions about this process? We’d love to know what they are.

Did this resource help you do something awesome with Gravity Forms? Then you'll absolutely love Gravity Perks; a suite of 32+ essential add-ons for Gravity Forms with support you can count on.

  • View All Perks
  • Buy Gravity Perks

Filed Under: How To, Tutorials gp populate anything gp preview submission multi-page form

Categories

  • How To (64)
  • News (21)
  • Plugins (14)
  • Releases (7)
  • Resource (3)
  • Snippets (58)
  • Tutorials (57)
  • Updates (104)

Recent Posts

  • How to Send a Follow-Up and Pre-Fill Information
  • How to Update Posts with Gravity Forms
  • Gravity Wiz Weekly #104
  • The Complete Guide to Using Gravity Forms With Zapier
  • Gravity Wiz Weekly #103

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2021 · Powered by WordPress · Gravity Wiz LLC

  • Support
  • Affiliates
  • About
  • Sitemap
  • Gravity Perks
    ▼
    • Gravity Perks
    • Tutorials & Snippets
    • About
  • Support
    ▼
    • Documentation
    • Support
    • Account