I'd like to use two separate fields to show and/or hide subsequent pages that a user sees. I was trying to do this with javascript, but can't seem to get the reference to the second field to work. I was trying the script below:
if (demographics.occupation.rawValue == "Regulatory Health Information Specialist" && demographics.role.rawValue == 1) {
form1.tech1.presence = "visible";
form1.tech2.presence = "visible";
}
The page the fields are in is called demographics and the two fields are called occupation and role. I can get things to show and hide fine if I just limit the script to the section that refers only to occupation, but really want to have mutliple conditions included. BTW, i have attaching this script to the occupation field.
Any help is greatly appreciated.
As an update, I've also tried the following script with no luck.
if ($.boundItem(xfa.event.newText) == "Regulatory Health Information Specialist" && this.resolveNode("role").rawValue == "1") {
this.resolveNode("tech1").presence = "visible";
this.resolveNode("tech2").presence = "visible";
}