How to Copy Field Choice Labels in Gravity Forms

Kick Copy Cat’s default functionality up a notch by teaching it to copy labels alongside field values.

  1. How Label Copying Works
    1. Step 1: Identify Your Fields
    2. Step 2: Add Copy Cat
    3. Step 3: Add the Snippet
    4. Step 4: Test The Label-Copying Cat
  2. Can I Copy Multiple Field Choice Labels All at Once?
  3. Snippet Sorcery Done!

GP Copy Cat is a powerful tool that copies data between fields. When it meets choice-based fields (like Drop Downs and Radio Buttons), our Copy Cat is trained to copy the choice’s stored value, and not the label we click on.

This presents a fun challenge: On a T-shirt order form, a user selects a size like “Medium” (label), while behind the scenes lurks a cryptic inventory code “shirt_m” (value). To create a clean order summary, you might want to copy the size’s label, not the confusing code meant for the warehouse guys!

The fix? We’ll teach our Copy Cat a clever snippet—one that shows labels, not values.

This article requires the Gravity Forms Copy Cat perk.

Buy Gravity Perks to get this perk plus 50 other premium Gravity Forms plugins!

View Plugin Buy Now

How Label Copying Works

Step 1: Identify Your Fields

First, note the Field IDs for your source and target fields. If you need help finding them, our guide on automatic copying shows you exactly where to find field IDs.

For our T-shirt form, we’ll need:

  • Source: Drop Down “T-Shirt Size” field (ID 1)
  • Target: Single Line Text field, “Your Selected Size” (ID 3)

With these, we can now build our Copy Cat command: copy-1-to-3

Tip

Building a Copy Cat command follows a simple formula. If you’re new to this, our guide on configuring Copy Cat teaches you exactly how.

Gravity Forms Form Editor showing two fields: T-Shirt Size drop down field ID 1 and Selected Size text field ID 3.

Step 2: Add Copy Cat

Click on your source field (T-shirt Size) and go to the Appearance tab. In the Custom CSS Class, enter the command: copy-1-to-3

The Appearance tab of a drop down field is displayed, with the Copy Cat class `copy-1-to-3` entered in the Custom CSS Class field.

At this stage, Copy Cat is active. But, if we were to test the form, it would copy the inventory code (value), not the size name (label).

A user selecting the Large option in the T-Shirt Size drop down field. The stored value `shirt_s` is instantly copied to the Selected Size text field.

Let’s turn this around using a handy snippet.

Step 3: Add the Snippet

To give our Copy Cat its label-reading powers:

  1. Open the Spellbook and activate GF Code Chest.
  2. Go to the ”Copy Label” snippet’s page and copy the code.
  3. Back in your form, click Code Chest from your form’s settings.
  4. Paste the code into the JavaScript field.
  5. Save settings.
The Code Chest settings interface shows a JavaScript field with a code snippet inside.

Step 4: Test The Label-Copying Cat

Save your form and preview it. Now, when a choice is selected from the dropdown, the actual label appears in the target field—not some warehouse hieroglyphics!

A user selecting the Large option in the T-Shirt Size drop down field. The option's label `Medium` is instantly copied to the Selected Size text field.

Tip

Want to prevent users from editing the copied text? Use GP Read Only to make any field non-editable.

Can I Copy Multiple Field Choice Labels All at Once?

Absolutely! Our snippet works great when you need to copy labels from multiple choice fields to other fields in one go.

Let’s evolve our T-shirt order form into a full product customizer. Say you have choice fields for T-Shirt Size, Color, and Logo Placement, and you want to copy all three selected labels to a summary section.

A user fills out a t-shirt form with fields for size, color, and logo. When checking 'Confirm Selection,' all choices are instantly copied to the summary fields below.

The trick is to use a Checkbox field as a trigger, and in its field settings, simply add all your Copy Cat commands, each separated by a space.

If you wanna learn more about this, we have a complete guide that shows you how to copy multiple fields at once.

Snippet Sorcery Done!

Let’s get labellin’. 😎

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.


Grab a bundle of free Gravity Forms plugins

Enter your email and receive our most popular free plugins and snippets, plus access to hundreds of others.

This field is for validation purposes and should be left unchanged.