Is This the Best Script Approach Multi Combo Box Add Lines Spawn Pages
This script has me baffled and if you have suggestions on the script direction that I should go, I would be eternally grateful and will bake a cake for the correct solution! The goal is to add this script to a page that can spawn additional lines as well as additional pages if needed. But I can’t put the horse in front of the cart. The script I have is not working as I intended for acrobat reader (it works fine on the PC Acrobat DC. There are 4 manufacturers that I have in drop downs/combo boxes, then an additional combo for a brand with selections and yet another combo with color selections. When I save it to document cloud and access the file with an Ipad the script runs fine; but if I change it to another manufacturer or null, it won’t select the brand or color to that manufacturer or even back to null. I am not sure why this is and learned just enough to be dangerous and ask the world of aficionados.
My concern is the current script is not functioning on the mobile device, but also the wrong direction to go when I want to add multiple lines and spawn pages, because a monster file size and an ugly script will surface. I read the section on creating a template which seems to be the direction I need to go to add lines and spawn pages and reduce file size, but I’m skeptical this script is probably not the right one to embed to the template to do that? If anyone with knowledge read through this issue and looked at the script, thanks for staying with me and welcome your assistance!
var f = this.getField("Product Line");
f.editable = true;
switch (event.value){
case "":
this.getField("Product Line").setItems([""]);
this.getField("Color Out").setItems([""]);
break;
case "Simonton":
this.getField("Product Line").setItems(["","Daylight Max","Madeira","Verona"]);
this.getField("Color Out").setItems(["","Cream","Brick","Bronze","Chocolate","Driftwood","Espresso","Pine","Tan"]);
break;
case "Milgard":
this.getField("Product Line").setItems(["","Style Line","Tuscany","Montecito","Fiberglass Ultra","Wood Essence","I.G. Insulated Glasspak"]);
this.getField("Color Out").setItems(["","Ivory","Sand","Fog","Silver","Tweed","Classic Brown","Espresso","Bronze"]);
break;
case "Alside":
this.getField("Product Line").setItems(["","Mezzo","Fairfield 80","Fairfield 70","I.G. Insulated Glasspack"]);
this.getField("Color Out").setItems(["","White","Beige","Architectural Bronze","Hudson Khaki","Desert Clay","English Red","Forest Green","American Terra","Castle Gray"]);
break;
case "PlyGem":
this.getField("Product Line").setItems(["","Thin Series 400 2 3/4","Block Series 200 3 1/4","I.G. Insulated Glasspack"]);
this.getField("Color Out").setItems(["","White","Beige","Architectural Bronze","Hudson Khaki","Desert Clay","English Red","Forest Green","American Terra","Castle Gray"]);
break;
}
