Is there any way to make a change the visibility of a Subform via a dropdown list? It seems so easy with radio buttons but when I try to apply some of the scripts (with modifcation) on drop-down's, it just doesn't work. It doesn't seem to cature the value of the dropdown when I change it, either in xfa.event.NewText or DropDownSel.rawValue. I have tried with both if statements and switch.
switch (xfa.event.newText) {
case "108":
Subform1.presence = "visible"
break;
default
Subform1.presence = "hidden"
break;
}
and
if (xfa.event.newText == "108") {
Subform1.presence = "visible";
}else{
Subform1.presence = "hidden";
}
I have tried to use it in Click, Exit, Change, almost all of the options available, but It doesn't want to change. Is it just something wrong with my logic or am I just way over my head in thinking that it should work the same way layers in html javascript do?