I created a form that contains multiple drop-down boxes. My form fillers are telling me that some of the drop-down boxes are too large, too many choices. They asked that I filter the data. For example, if the form filler selects "A" from the first drop-down box, they want to see only those options related to "A" in the 2nd drop-down box. If they select "B" from the first box, they want to see only those options related to "B" in the 2nd drop-down box, etc. As you can probabaly tell, I am not a programmer. Can someone point me in the right direction? I've been looking everywhere for instructions or examples. Thanks.
Views
Replies
Total Likes
We can do this with power of JavaScript. I would use the substring function in loading the values to dropdown.
for example I will have code similar to the following on DropDown1 'exit' event
var FilterChar = this.rawValue;
var DD2AllValues = "A1,A2,A3,a1,a2,a3,B1,B2,B3,b1,b2,b3,C1,C2,C3,c1,c2,c3";
DD2AllValues = DD2AllValues.split(",");
DropDown2.clearItems()
var curItem
var curChar
for (i=0,i<DD2AllValues.length,i++) {
curItem = DD2AllValues[0];
curChar = DD2AllValues.substring(0,1)
if (curChar == FilterChar) {
DropDown2.addItem(curItem);
}
}
hope this helps though you have to change a lot to make it work for your situation.
Good luck,