Copy link to clipboard
Copied
Hello, I have very little experience with JS and im trying to learn on my own as much as i can, I am trying to see how i can have multiple variables on a cascading drop down
var Itemlist = this.getField("Dropdown1","Dropdown2);
if(event.willCommit)
{
switch(event.value){
case "O2 Concentrator":
Itemlist.setItems([" ","No Filter","4-Way Valve","4-Way Valve Rebuild","4-Way Valve Rebuild (w/end caps)","4-Way Valve Rebuild (w/gasket)","4-Way Valve Rebuild (w/end caps & gasket)"]);
break;
case "Lift":
Itemlist.setItems([" ","2-Channel Hand Pendant","4-Channel Hand Pendant","Sling Clips (pck of 6)","Boot Boom","Emergency Pull Pin","Stop Button (Control Box)"]);
break;
case " ":
Itemlist.setItems([""]);
break;
}
}
Copy link to clipboard
Copied
This is not valid:
var Itemlist = this.getField("Dropdown1","Dropdown2);
You need to treat each field on its own:
var Itemlist1 = this.getField("Dropdown1");
var Itemlist2 = this.getField("Dropdown2");
Copy link to clipboard
Copied
This is not valid:
var Itemlist = this.getField("Dropdown1","Dropdown2);
You need to treat each field on its own:
var Itemlist1 = this.getField("Dropdown1");
var Itemlist2 = this.getField("Dropdown2");
Copy link to clipboard
Copied
Thank you so much!