Getting Started with Dynamic Lookup
The Gravity Forms Dynamic Lookup field enables you to populate field choices from two sources:
- Other Gravity Forms entries
- WordPress users
This guide will walk you through setting up and using Lookup fields effectively.
Adding a Lookup Field
Edit your form in Gravity Forms, open the "Advanced Fields" tab and drag the "Lookup" field onto your form.
Basic Configuration
The first thing you need to do is select a source type. Choose between Gravity Forms entries or WordPress users. This determines where your dynamic field choices will be pulled from and sets the foundation for how your Lookup field will function. Once selected, you can refine the data further with filtering options, sorting preferences, and display settings to ensure only the most relevant choices appear in your form.
- Input Type: Choose either Drop Down, Radio, or Checkbox. (Drop Down and Checkbox fields support multiple selection).
- Source or Choices: Choose to dynamically populate field choices with Gravity Forms entry data or WordPress users.
Using Gravity Forms Entries as source
When pulling choices from other form entries:
- Source Form: Select the source form containing your desired entries.
- Source Field: Choose which field to use as the display value.
- Show only entries created by the current user: Only show entries created by the current user.
- Show only unique results: Filter out duplicate values.
- Additional settings: Clicking this button opens up additional settings in the "Advanced" tab where you can choose a data storage type and choose a sort direction.
Using WordPress Users as source
When using WordPress users as your data source:
- User Group: Select a user role to dynamic pull in users with that role.
- Display Value: Choose what to show (Display Name, Username, Email, User ID, or full info).
- Additional settings: Clicking this button opens up additional settings in the "Advanced" tab where you can choose a field to sort by and a sort direction.
Using conditional logic
The Lookup field fully supports Gravity Forms conditional logic:
- Click the "Conditional Logic" tab in field settings
- Enable conditional logic
- Set up your rules to show/hide the field based on other form values