Creating cascading dropdowns with the Filter by Field setting
Cascading dropdowns (also called dependent dropdowns) are fields whose choices depend on an earlier answer on the same form. A visitor picks a category, and the next dropdown shows only the items in that category. You build them with the Filter by Field setting of a Lookup field from Gravity Forms Dynamic Lookup.
Note: Filter by Field appears when the Lookup field’s Source of Choices is Gravity Forms and its Input Type is Dropdown.
How Filter by Field works #
A Lookup field takes its choices from the entries of the source form. By default, it lists all of them, up to 2,500. Filter by Field links the choice list to a field on the form the visitor is filling out: only source entries whose matching field equals that field’s value appear as choices.
You choose which value links the two, such as a category, an email address, or a customer ID. The Lookup field fills its choices once the visitor enters a value in the linked field. The settings offer these field types:
- Source Form Field to Match: Single Line Text, Paragraph Text, Drop Down, Multi Select, Radio Buttons, Checkboxes, Email, Phone, Website, Name, Address, Date, Time, Number, and Lookup fields on the source form.
- Value from This Form’s Field: Single Line Text, Drop Down, Radio Buttons, Email, Phone, Number, Website, and Hidden fields on the form visitors fill out, and Lookup fields there that allow one selection. A Lookup field that the field you’re setting up already narrows is left out.
With a Lookup field in both settings, one Lookup field can narrow another’s choices, as Narrowing one Lookup field with another shows.
Our example #
The example is an equipment rental request where the Product dropdown only shows products from the selected category. It uses these forms:
- Rental equipment, the source form: one entry per product, with a Product name field and a Category field.
- Equipment rental request, the form visitors fill out: a Category dropdown, followed by a Product Lookup field.
Step 1: Prepare the source form #
The source form holds the data your Lookup field draws its choices from. In our example, the Rental equipment form has two fields:
- Product name (Single Line Text): what visitors see as choices.
- Category (Drop Down): the value the filter matches against.
Each product is an entry on this form, for example “Cordless Drill” in the “Power Tools” category. You can add entries by hand, or import them from a spreadsheet with GravityImport.
Step 2: Add the field that drives the filter #
On the form visitors fill out, add the field whose value filters the Lookup choices. In our example, it’s a Category Drop Down with the choices “Power Tools”, “Hand Tools”, and “Safety Gear”.
Note: The filter lists the source entries whose value equals the value picked in this field. Give this field’s choices the same values that the source form’s Category field stores.
Step 3: Add and configure the Lookup field #
- Add a Lookup field to the form. It’s under Advanced Fields.
- In the field settings, set Source of Choices to Gravity Forms.
- Set Source Form to the form holding your data (Rental equipment, in our example).
- Set Source Field to the field visitors should see as choices (Product name).
Step 4: Turn on Filter by Field #
Still in the Lookup field’s settings:
- Check Filter by Field.
- Set Source Form Field to Match to the field on the source form that holds the linking value (Category on the Rental equipment form).
- Set Value from This Form’s Field to the field on this form that provides the value (the Category dropdown you added in step 2).
- Save the form.

What visitors see #
On the published form, visitors can’t open the Product dropdown until they pick a category. Once they pick one, it loads only the products in that category, and a new pick loads the products of the new category. If no product matches, the dropdown reads “No matches found.”

The filtered list shows up to 100 matching choices by default. Developers can change this limit (see Developer notes).
Narrowing one Lookup field with another #
The field that drives the filter can be a Lookup field too. In this version of the example, the categories are entries of an Equipment categories form, and both forms pick them with a Lookup field:
- On the Rental equipment form, make Category a Lookup field with Source Form set to Equipment categories and Source Field set to its Name field.
- On the Equipment rental request form, make Category a Lookup field with the same Source Form and Source Field. Leave Enable multiple selections unchecked: Value from This Form’s Field doesn’t list a Lookup field that allows several selections.
- In the Product Lookup’s settings, check Filter by Field. Set Source Form Field to Match to the Rental equipment form’s Category, and Value from This Form’s Field to this form’s Category.

When the visitor picks Power Tools in the Category Lookup, the Product Lookup lists the power tools.
The Lookup on the source form can allow several selections. A product filed under Power Tools and Safety Gear then shows for either category.
Filter by Field compares the saved values, so both Lookup fields need the same Storage Format:
- Two Lookup fields that save the ID match, and so do two that save the text.
- When one saves the ID and the other saves the text, their values differ, and the Product dropdown reads “No matches found.”
- On this form, a Lookup field that saves the text also matches a Drop Down field on the source form with the same text.
Making long lists searchable #
For source forms with many entries, check Enable enhanced user interface on the Lookup field’s Appearance tab. The dropdown gets a search box, where visitors type to narrow the filtered choices.
Developer notes #
These filters change how Filter by Field works:
gk/lookup/filter/value: changes the value used to filter the choices.gk/lookup/filter/max-results: changes the maximum number of filtered choices (default: 100).gk/lookup/filter/allow-public: turns off filtered choices for logged-out visitors.