This article requires the GP Populate Anything perk. Buy Gravity Perks today to get this perk plus 33 other premium Gravity Forms plugins!
Picture a form that automatically fills in field values from a previous entry. For example, a warranty service form that automatically populates the customer’s registered products.
While you can easily populate the current user’s previous purchases using GF Populate Anything, in this tutorial we’re going to show you a different approach: letting the customer look up their previous entry using values they submitted in that entry.
Getting Started
Looking up previous entries can be done with any form, but for the sake of this tutorial we’ll assume you have an order form that includes at least these four fields:
- Order Number
- Name
- Model
Steps
Step 1 – Add Look Up Fields
In order for your customer to be able to look up their entries, you need to give them some fields to search with. I like to use two fields for enhanced security. In order to do any look up they’ll need to provide two pieces of information.
We’ll start by adding an Order Number and Email field field.

Both of these fields will be used to look up the previous orders.
Step 2 – Look Up Other Field Values
We can now set up Populate Anything to populate the rest of the fields in our form. In my case we’re just going to populate Name and Model. The settings are mostly the same for both fields.
The key is using Populate Anything’s filters to only populate the rest of the form if both the Order Number and Email match what was entered in the other form.

With the same filter settings for both fields, set the Name field’s value template to populate the Name field from the order form.

Follow the same pattern for the Model field, map it to Model from the order form.

That’s It!
You’re done. When a user visits the form and inputs their Order Number and Email address, the Name and Model field will automatically populate.

If the Model and Email fields don’t match an existing order, nothing will populate.

Taking It Further
Automatically Generate Order Number
In our example, we’re looking up the initial Order Number from our sales form. We’re using GF Unique ID to automatically generate that number for every order.
For increased security, GF Unique ID could also be used to generate an unguessable confirmation or reference number for order look-ups.
Make Populated Fields Read Only
By default, the populated fields are editable. To prevent users from being able to edit those fields, use GF Read Only.
Require an Existing Value for Submission
To prevent form submission until the user inputs a valid existing value, check out Require an Existing Value for Submission with Gravity Forms. Based on our order look-up scenario, this would be an easy way to prevent submissions if there is no matching order.
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.
Hi, I’m looking for a way to allow a public user (not logged in) to edit their entry. I’ve added your snippet here: https://gist.github.com/spivurno/32e914d67723f89717be2904ce6234c4 but when I access my form at mysite.com/form?eid=1 it doesn’t populate the form with entry #1. Is that how it should work? Otherwise, will Populate Anything allow we to do this? I’m sure I could create a 2nd “edit” form and pass the data from form 1 to form 2. But my form is quite large and I don’t want to create a 2nd separate form. Is there a way to have one form, and provide public users with a url like ?eid=1 which prefills the form with the entry data from #1 and allows them to edit, submit and update entry #1? Thanks Ian
Hi Ian,
Once you have the snippet installed, you should be able to access the form when you pass ?eid=entryID as a query parameter. If you’re a Gravity Perks Customer, you can send us a message via our support form so that we can assist you further.
Best,