Ok, so I have this working perfectly except I want the subform to appear when 1 of 2 options are selected from the drop-down list. I have it working perfectly for when one item is picked from the drop-down list using:
if(DropDownList2.xfa.event.change == "Farm"){
FarmBuilding.presence = "visible";
}
else{
FarmBuilding.presence = "invisible";
}
How to I add another item to this script so that when it is chosen from the drop-down list, this same FarmBuilding subform appears? ( I want the subform to appear when Farm is picked from the drop-down list and when Farm + IR is picked from the drop-down list).
I have tried using:
if(DropDownList2.xfa.event.change == "Farm" || "Farm + IR"){
FarmBuilding.presence = "visible";
}
else{
FarmBuilding.presence = "invisible";
}
but that did not work.
Thanks!
if( (xfa.event.change == "Farm") || (xfa.event.change == "Farm + IR") ){
FarmBuilding.presence = "visible";
}
else{
FarmBuilding.presence = "invisible";
}
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script