0 Replies Latest reply on May 21, 2014 10:25 AM by jajawheels

    Trying to set visibility of multiple layers using an if/else based on fields selected on the first page of pdf.

    jajawheels Level 1



      I am currently attempting to build a 2 page PDF for a quality engineer which he will use for machine inspection. I have built so far, the first page as a form with a field for which machine he is currently inspecting. Because each machine type has a separate inspection log (all are pdf's), I'd like to run a javascript on the machine field which then would bring up the appropriate inspection form as a layer on the second page. The idea being, each of the different machine inspection logs as layers on page 2 set to 'hidden' until the machine field on page 1 triggers the appropriate layer to "visible".


      So far I've referenced the Javascript API reference for Acrobat Pro, but cannot seem to find the appropriate methods for achieving this functionality. Could anyone please demonstrate an example of a conditional statement where multiple layers are set to visible/hidden.




      if (machine = machine1){


      //Set machine1 inspection log to visible


      }else if (machine = machine2){


      //Set machine2 inspection log to visible






      I am open to alternative ways for achieving the end goal, however, I am not an advanced programmer.


      Thank you


      Additional Notes:

      -I'd prefer to keep it as one document

      -The inspection forms are currently stored on a network share