Skip navigation
NRB1070
Currently Being Moderated

Show and hide pages based on inputs from multiple fields

May 17, 2012 11:21 AM

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";

}

 

 

 

 

 

 

 

 

 

 
Replies
  • Currently Being Moderated
    May 19, 2012 4:07 PM   in reply to NRB1070

    Hi,

     

    There are a few things to check here, it might be quicker to host your form somewhere liek Acrobat.com and add a link to this thread, We would need to know what types of fields occupation and role are, what events you have added the code to and if they are drop down lists do they have id values.

     

    Regards

     

    Bruce

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points