This plugin is part of the Gravity Perks package. Buy Gravity Perks today to get this perk plus 30 other galactic Gravity Forms plugins!
What does it do?
GF Populate Anything allows you to dynamically filter and populate field choices and values with posts, users, taxonomies, terms, Gravity Forms entries, and databases. Pretty much anything! Choices and values can be filtered based on the values entered/selected in other fields allowing you to fetch and populate fresh, dynamic data as the user interacts with the form.
GF Populate Anything also provides support for Live Merge Tags which allow you to display dynamic, filterable data in your field labels, descriptions, and content.
- Dynamically Populate Field Choices
Populate any choice-based field (e.g. Drop Down, Radio Buttons, Checkboxes) with dynamic, filterable data.
- Dynamically Populate Field Values
Automatically populate field values with dynamic, filterable data.
- Dynamic Filtering by User-specified Input
Filter and populate fresh, dynamic data based on values/selections made in other fields.
- Chained Selects, Radio Buttons & More!
Chain the available field choices based on selections in other fields.
- Live Merge Tags
Add auto-updating merge tags anywhere inside your form (labels, descriptions, HTML content).
- Specialized, Built-in Data Sources
Populate Posts, Users, Taxonomies, Terms, and Gravity Forms entries with specialized options for each. For everything else, populate directly from the WordPress database.
- Flexible Choice and Input Templates
Complete control over the the populated value and label for choices and inputs.
- Results Preview
See the exact data that will be populated based on your filters right in the field settings.
- How do I enable this functionality?
- Feature Details
- Populating Choices Dynamically
- Populating Values Dynamically
- Filtering Objects
- Field Value Objects
- Known Limitations
How do I enable this functionality?
After GF Populate Anything is installed, you’ll want to enable “Populate Choices Dynamically” or “Populate Value Dynamically” for a given field in the Gravity Forms Form Editor. Here’s what that looks like when populating choices.
Populating Choices Dynamically
If you wish to dynamically populate a choice-based field’s choices, you can do so by enabling “Populate choices dynamically” in the field’s settings.
In the example below, we configured a radio button field to have its choices dynamically populated with users who have the “Administrator” role.
Here’s what the configured radio button field looks like on the frontend.
Populating Values Dynamically
Populating values with GF Populate Anything is similar to how populating choices work. Enable “Populate value(s) dynamically” in the field’s settings and then configure it accordingly.
In the example below, we configured a single line text field to have its value populated with the post title of the most recently added post.
Here’s what the configured single line text field looks like on the frontend.
Create groups of conditions that filter which objects are populated into the field. Add a condition to your group with the (+)/(-) icons to the right. All conditions in a group must be true for the group to match. Add another group by clicking the “Add Filter Group”. Objects that match any group will be populated into the field.
>=(greater than or equal to)
<=(less than or equal to)
- Available wildcards
%– Zero, one, or multiple characters
_– Single character
- Available wildcards
Depending on the object type you select, you will have different properties to select from.
- Parent Post
- Post Content
- Post ID
- Post Status
- Post Title
- Post Type
- Post Taxonomies (Dynamic)
- Post Meta (Dynamic)
- Parent Term
- Taxonomy Term
- Term ID
- Display Name
- User Email
- User ID
- User URL
- User Meta (Dynamic)
Gravity Forms Entry
- Created by (User ID)
- Entry ID
- Fields (Dynamic)
The Database Object Type’s properties are dependent on the table you select. Once you select a table, the properties will be all available columns on the MySQL Table.
After selecting the filter property, the Filter Value dropdown will be populated with a list of values that apply for that property. For example, if you are populating posts into a field and add a filter condition for the “Post Status” property, the Filter Value dropdown would be populated with a list of available post statuses (e.g. Draft, Pending Review, Published).
Form Field Values
Objects can also be filtered by values entered by the user when the form is filled out. After selecting the filter property and operator, select the desired field from the Form Field Values option group. When a user enters a value into the specific field, the objects populated into this field will be filtered by that value.
Field Value Objects
One common use case with GF Populate Anything is populating field values from a field with dynamically populated choices. You can do this by manually configuring the Object Type and Filters to use field values, but an even easier way is to use a Field Value Object.
Field Value Objects are available on any field that supports values when there is another choice-based field that has dynamically populated choices on the same form.
Example Field Value Object Configuration
In the example below, we wired up a single text field to display the user ID of the selected user in the radio field above it.
Example Field Value Object Frontend
Live Merge Tags
When GF Populate Anything is activated, merge tags anywhere on a page with a Gravity Form will be automatically re-populated when any field is changed.
Live Merge Tags can be used anywhere on a page including field labels, post content, or even widgets.
Example Live Merge Tag
- Dynamic choices are not yet available in conditional logic.