Question:
Is anyone able to help me to write code that will allow me to have 3 drop down menus where the selection available is dependent on the previous selection
Product:
Wix
What are you trying to achieve:
I have a table which contains data that relates to Make, Model and size. I am trying to create drop downs where the first dropdown relates to the Make of bike. On selection, the second dropdown will give available Models based on the selected make. The 3rd dropdown will show available selection of sizes based on the model selected. So far, I am able to make this happen for the make and model drop down but cannot get the same result for the size.
What have you already tried:
I have tried youtube and Wix website Dev Assistant but cannot get the last drop down menu to work with the suggested code from the Wix Dev Assistant.
Hi, @user5406 !!
Posting the code you have so far will make it easier for forum members to help you! 
Thank you @onemoretime . I’m extremely new to all this, sorry 
I need help with the next part of the code which will give a dropdown of the size relevant to the model selected and then display the price which is relevant to the size selected (hope that makes sense).
I used this youTube tutorial - How to Filter a Dropdown Filters Options Based on another Filter | Wix Data Filters: Part 2
This is the code:
import wixData from ‘wix-data’;
$w.onReady(function (){
$w('#MAKEfilterDropdown').onChange(()=>{
$w('#CARSdataset').onReady(()=>{
const make = $w("#MAKEfilterDropdown").value
$w("#CARSdataset").setFilter(
wixData.filter().eq("make", make)
)
$w("#MODELdataset").setFilter(
wixData.filter().eq("make", make)
)
$w("#MODELfilterDropdown").enable();
})
});
$w("#MODELfilterDropdown").onChange(()=>{
$w('#CARSdataset').onReady(()=>{
const model = event.target.value;
$w("#CARSdataset").setFilter(
wixData.filter().eq("model", model)
)
$w("#MODELdataset").setFilter(
wixData.filter().eq("model", model)
)
})
});
});
See ifs other tutorial can help, this is mine from 6 years ago …..
(The editor will be different but it should hel you with the basics of understanding what you need to do)
1 Like
I think it would be a good idea to start by watching the video shared by Code Queen. This is something that can be figured out with effort, so it’s important to take at least 30 minutes to study on your own first. The version of her from six years ago will surely guide you to the right answer. 
Teaching is easy, but being able to do it on your own holds far greater value. Rest assured, this community is full of people who are willing to lend a helping hand to those who put in the effort.
1 Like