Help when a dropdown a is selected, next dropdown limited choices then select and populate text
So, my boss has asked me to do a super difficult task in Adobe forms. He would like me to have a drop box that limits the choices in three-five other dropdown boxes. Based on the selection in the the other dropdown boxes, these are to populate up to three text fields with a numeric value.
For example, in dropdown box 1, if I select either 'Fibreglass', 'Ceramic' or 'Glass', then in dropdown box 2/3/4/5, the options would be specific to each (e.g. fibreglass would have the options of Gas 30m, Solar 30m and Electric 30m in DB2 and Blanket 30m or Roller 30m in DB3 but if glass is selected, it would have Gas 50m, Solar 50m and Electric 50m and Blanket 50m or Roller 50m in DB2 ). Then, if an item is selected in DB2 like Gas 30m, three text fields would populate with '1', '2', and '3' with DB3/4/5 having their own individual selections that populate their own text fields.
I have the script for populating the the text fields from the dropdown box 2/3/4/5 selection but I have no clue as to how to find or create a script to limit the choices in dropdown box 2/3/4/5.
If you can help, that would be great.
The script I have, which works perfectly, in 'validation' of the second dropdown (and would also go into the others as they have their own text fields to populate) is:
Note: S/L/V are the text fields
var S = this.getField("S1");
var L = this.getField("L1");
var V = this.getField("V1");
if(event.value == "Gas 30m"){
S.value = 1;
L.value = 2;
V.value = 3;}
else if(event.value == "Gas 40m"){
S.value = 4;
L.value = 5;
V.value = 6;}
else if(event.value == "Gas 50m"){
S.value = 40;
L.value = 50;
V.value = 60;}
else if(event.value == "Solar 30m"){
S.value = 41;
L.value = 51;
V.value = 61;}
else if(event.value == "Solar 40m"){
S.value = 45;
L.value = 55;
V.value = 65;}
else if(event.value == "Solar 50m"){
S.value = 49;
L.value = 59;
V.value = 69;}
else if(event.value == "Electric 30m"){
S.value = 48;
L.value = 58;
V.value = 68;}
else if(event.value == "Electric 40m"){
S.value = 47;
L.value = 57;
V.value = 67;}
else if(event.value == "Electric 50m"){
S.value = 49;
L.value = 59;
V.value = 69;}
else{
S.value = "";
L.value = "";
V.value = "";}
