How to Automatically Copy Values from One Field to Another in Gravity Forms

Eliminate duplicate typing in your forms. GP Copy Cat can automatically copy field values as users type. No clicks required.

  1. Set Up Automatic Field Copying
    1. Step 1: Identify Your Fields
    2. Step 2: Add the Copy Cat Class
  2. When Automatic Copying Shines
    1. Taking it Further
  3. Mischief Managed 

Ever watched someone fill out a form and painstakingly type the same information twice? It’s like watching someone manually copy-paste when Ctrl+C exists! 😱 Enter GP Copy Cat to save the day!

Copy Cat offers a few spells in its arsenal, including manual copying (checkbox-triggered) and automatic copying (fields copy as users type). Both have their place. While manual copying gives users the choice, automatic copying works brilliantly when you always want the same information in multiple fields. 

Take school enrollments, for example. As a parent, re-typing your name for each of your kids is no fun. With Copy Cat, just type your name once and it instantly appears for every child on the form as you type, zero clicks given!

Let’s dive into this Copy Cat magic… The hands-off method. 🪄

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

Set Up Automatic Field Copying

We’ll use a school enrollment example where a parent’s name automatically copies to the emergency contact field.

Step 1: Identify Your Fields

Every field in your form has a unique Field ID number that identifies it. You can find these IDs at the top right corner of the fields settings. We’ll need to identify these so we can connect them using Copy Cat.

In our example, we’ll use two Name fields:

  • Field ID 1: Parent/Guardian Name (our source)
  • Field ID 3: Emergency Contact Name (our target)
Gravity Forms Form Editor showing two Name fields: Field ID 1 (Parent/Guardian Name) and Field ID 3 (Emergency Contact Name).)

Snippet Alert!

Make finding field IDs for your Copy Cat spells easier with our snippet that Displays Field IDs Next to Field Labels.

Step 2: Add the Copy Cat Class

Here’s where the magic happens. All you have to do is follow this precise formula:

copy-{fieldId}-to-{fieldId}

Replace the first {fieldId} with the ID of the field you’re copying from, and the second {fieldId} with the ID of the field you’re copying to.

Here’s how to use it:

  1. Click on your source field.
  2. In the field’s settings, go to the Appearance tab.
  3. In the Custom CSS Class field, enter your Copy Cat class. In our example, that’s copy-1-to-3.
  4. Save your form.
The Appearance tab of a name field is displayed. The Copy Cat class ‘copy-1-to-3’ is entered in the Custom CSS Class field.

Pro-tip

Already have a CSS class in your field but need to add one or more? Simply add a space after your existing class and type the new Copy Cat class.

That’s it! Start typing in the Name field, and watch it appear instantly in the Emergency Contact Name field. Pure copying magic. ✨

Preview of a form where a user types a name in the ‘Parent/Guardian’ field and it instantly appears in the ‘Emergency contact’ field below.

When Automatic Copying Shines

All of this works best when you’re confident that users will always want the same information in both fields. It’s especially useful in multi-page forms where you can copy key info like name or address to later pages.

Here are a couple of industry-specific examples:

  • Freelance Contracts: Copy client company address to invoice billing address for streamlined payments.
  • Service Appointments: Auto-copy a client’s address to their service location when they need work done at home.

Taking it Further

There are additional ways Copy Cat can work with other perks in our suite to create some seriously magical form wizardry. For example:

  • Tiered Pricing for Service Bookings: When booking a room or a studio by the hour, customers pick their start and end times. GP Date Calculator works out the total hours. Copy Cat moves this number to the quantity field automatically. Together with GP Conditional Pricing, longer bookings could mean better hourly rates without manual calculations.

Master these enchantments with our guides to setting up conditional pricing with Nested Forms and bulk pricing with calculated units.

  • Condition-Based Copying: You can also set up automatic copying only when a specific field is completed. For example, when a parent enters their relationship to a child (like “Mother” or “Father”), their name can automatically copy to the emergency contact field. To learn more, check out our guide on copying fields based on conditions.

Mischief Managed 

No more duplicate typing. Better UX. Cleaner Data. What’s not to love!?

Time to pick your first auto-copy victims. Which of your fields are getting automated? 🎯

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.