Learn how to create conditional drop down lists in WordPress. We'll show a simple, code-free method to make a car make and model WordPress forms drop down list.
Approximate read time: 5.5 minutes
Looking for a way to create conditional drop down lists in forms? Don’t know what a conditional drop down list is?
Consider an auto dealer form with a car make and model drop down list.
A user chooses the year of their car, then make and model from a list of options. And these options only apply to the year/make they have chosen already.
You may have also heard these forms called chained select or dynamic drop down lists.
This functionality is super helpful when creating forms to handle price estimates, quotes, payments, etc. It's also great for end-users because they won't have to filter through many irrelevant options.
Make a Conditional Drop Down Now!
With Formidable Forms, you can create a dynamic drop down list from a user-friendly interface. No need to mess with complex queries or custom code solutions.
Keep reading for a step-by-step guide on how to use this dynamic drop down list WordPress plugin.
How to create a drop down list in WordPress forms
Before diving into the step-by-step, let's look at Formidable Forms as a dropdown list plugin for WordPress.
- Create a "data form" to house all the data that will populate your cascading drop downs. End-users will not interact with this form directly — it's just there to hold the data.
- Add entries to populate your "data form" with the needed data. You can save time by importing a CSV. Rather than manually entering your data, let Formidable Forms do it!
- Create a second "end user form." This is the form that your human visitors will interact with.
- Add lookup fields to the "end user form" to pull data from the "data form" to populate the drop downs.
We'll use an auto industry example with three conditional drop down fields for this example, but you can use it on any form you choose — a contact form, an order form, or others.
The order will go like this:
- User selects the Year of their car
- The user chooses their vehicle's make from Makes available in Year
- Users choose their car's specific model based on the Year/Make they set
Step 1. Create the "data form"
To start, go to Formidable → Forms in your WordPress navigation menu. This form acts as your "data form."
Again, your users will not directly interact with this form. The form you create later will pull data from this form's entries.
Then, drag and drop a text field for each drop down list. These are for each list you want to include in your end-user form.
For our example, there would be three text fields:
- Year
- Make
- Model
Remember, you can add custom input fields to suit your needs (for example, a dropdown for official forms) and customize the field label as well.
Then, click Update to save your form.
Step 2. Import Data as Form Entries
Next, you'll need to fill your "data form" with the menu items you want to display in your cascading drop down menu.
To do this, you'll add each piece of data as a form entry.
If you have a large data set, import a CSV file and auto-populate the form while creating your WordPress dropdown menu. For example, our automobile data set has over 7,000 rows — you don't want to do it manually!
If you don't have much data, you can manually add entries from the Entries tab of your data form.
To import a CSV to Formidable Forms, ensure that the headings in your CSV match the text fields in your "data form."
In Excel, you can see how our example CSV has three columns, each of which matches the text fields that we created in the previous step:
Once you have your CSV file ready…
- Go to Formidable → Import/Export
- Use the Choose File button to select your CSV file
- Enter the CSV delimiter (this is almost always a comma)
- Select your "data form" from the Import Into Form drop down
- Click Upload file and import
On the next screen, make sure that the data from your CSV file is mapped correctly to the corresponding fields in your form so everything works when you create a new menu.
Now, you have the data you need to populate your conditional drop down lists:
Next, it's time to add a dropdown menu for your visitors to interact with.
Step 3. Create an "End User Form" and Add Lookup Fields
Next, you need to create a drop down list in a form. This will be the form that your human visitors see.
Once you have your new form, add a Lookup field and give it a name - e.g., "Select Year." This will act as your dropdown field.
Then, find the Lookup Options settings in the Field Settings and select your data form using the Select Form drop down.
Select the source field to pull data from using the Select Field drop down - e.g., "Year"
Make sure to save your changes.
Then, configure another Lookup field for the following data set. You'll only now use the Watch a Lookup Field button to make this lookup field dependent on the previous Lookup field.
This allows you only to display options that match the last field and create that "cascading" effect:
Make sure to save your changes.
You'd add another Lookup field to add the final dropdown select (for our example). Only now, you'll use the Watch a Lookup Field option to make it dependent on the previous fields:
If you want to add more custom dropdowns to your form, you can repeat the same pattern as often as needed. Plus, you can choose Multiselect dropdowns, which (you guessed it!) adds multi-select options. So people can select the drop down and then choose multiple options!
And that's it. You can view your form and manage it with the live preview, and you should see that nice cascading effect when you interact with your form:
Step 4: Add the drop down list WordPress form to your pages and posts
Last, we want your visitors to be able to see your form.
So, head to the post or page where you want to show the form and add a new WordPress block.
Next, search for the Formidable WordPress block, add it, and choose your form from the dropdown menu.
Last, update your post or page and your form will be live on your site!
Create your first conditional drop down list today
Cascading drop down forms are a popular approach that makes an excellent option for forms involving price estimates, quotes, payments, locations, etc.
With the Formidable Forms WordPress plugin, you can create conditional drop down lists using as many conditions as needed without writing any code. It works with any WordPress theme, so you don't have to worry about compatibility.
To create dependent drop down lists with Formidable Forms, you'll need the Formidable Forms Basic plan or above.
If you're not already using Formidable Forms Pro, learn about all the helpful form builder features to understand why Formidable Forms is the best WordPress form plugin for conditional drop down lists and conditional logic, period!
Gillian says
Can I import a CSV file with both the drop down options (into the Data Form) and import the conditions. It doesn't matter if there is programming involved.
Sara says
Where is the option to import CSV's in the free version? The only option I see is XML.
Ryan Cordoni says
Hi Sara, yes, in the free version XML is the only option. Have a look here for more info: https://formidableforms.com/knowledgebase/import-forms-entries-and-views/
abdelilah sadki says
hello , can i import PDF files , to show them by the dropdown list the same example but to download PDF files in the end user forms
srwells says
Sorry, this feature is not supported.
shivam says
can i use it with woocommerce product
jasononline says
Yes, we have a woo commerce integration. You can learn more about that here: https://formidableforms.com/knowledgebase/formidable-woocommerce/
Prophit23 says
This is very useful for complex forms. I used it to build a multi-page form for employees to kick-off their annual review process. Depending on who they select as their leader, they receive different conditional options later on in the process. This, along with a an add-on for PDF generation, has made our annual review process much more streamlined and automated.
Sam Treadway says
This is one of the more useful features for complex forms. I've come across many, many forms that do not filter out options based on previous selections. It leads to mismatched data, confusion and a lots of wasted time.
milkboy31 says
Alternatively I was thinking you can just use basic conditional fields and choose which dropdown appears second based on the answer to the first, but that only is really feasible for a small amount of options or you'd have a LOT of fields that are hidden/conditionally shown... so to have this as an option to keep your forms simple, is huge!
trishacupra says
Thanks for the detailed instructions. It's something I haven't done yet even though I've been using Formidable for several years.
[email protected] says
Very complete and useful tutorial. An excellent option
Joan Mayer says
You make the learning process much smoother and easier to follow! Thanks for the helpful tutorial.
jpruitt says
I am building a database for a school that requires lookup using timeframes and courses to find listings of students and professors. This is just what I need.
Gregory Matthee says
Great article! I finally understand how to use the Look up fields properly. I am building a complex form for company use at the backend of our website. I have been struggling for months trying to get the Look Up fields to work properly.
Thank you!
srwells says
Glad to hear this article helped, but sorry to hear you struggled for so long. Just a reminder that our support team is always standing by and happy to help if you get stuck implementing one of our features.
Stephen OConnor says
I found this really useful thanks. Am still wondering if there is a way to separate the data sources so that I am choosing one field from one data source, but then using the choice i made to pull data from another data source for the next dropdown.
Darko Gorgiev says
Can I put a picture and display it after pressing "search" button?
srwells says
Yes, this can be done.
Chris says
Is there a way to have have a single select listing all parent categories, then a second select with the sub-categories based on the first selection?
srwells says
HI Chris, We call these cascading fields. They can be done in a few different ways based on the type of data you are working with, but this is the most common setup: https://formidableforms.com/knowledgebase/lookup/#kb-set-up-cascading-fields
howdytheme says
order dropdown contact form 7 is best plugin to the usual drop-down field of the tag field will automatically add the names of the countries.
Moahmmed Bilal says
I have 3000+ makes and Models. when I select a make it takes long time to refresh the model. I need a Contact Form like this website https://goproengines.com/ which is Instant and doest take time to load.
It it possible to achive it using Formidable
srwells says
Hi there,
We work hard to keep things performant and fast, But there are a lot of factors that go into this including server configuration, caching, theme and plugin combinations.
While 3000 doesn't seem like too many for our plugin to handle well, I would recommend testing out this element of your setup to make sure it works to your liking. If it doesn't, you can always get a refund within the first 14 days.
dhruv karnik says
I'm not able to do conditional dropdown in my forms and also tried looks ups but it is not working Pls help ASAP!
Jonathan A says
Hey Dhruv,
Could you create a support ticket on the following form?
https://formidableforms.com/new-topic/
We'll be happy to help you resolve the issue.