/ Id-Extras Forum / How to utilize layers in InDesign to export through FormMaker as layers in a PDF

  • Author
  • #6880 Reply
    Teagan Caudle

      I was tasked to make a PDF fillable form in two weeks (August 19th) to mimic a survey page in an app. There are questions with answers to select from a dropdown list, and the last three selections, if chosen, are to reveal another question with a series of checkboxes. To do this, I would need to have two layers where the second one is displayed if a user chooses one of those selections. I can see how to create layers in Acrobat and InDesign, but I would like to know if FormMaker can export the layers from InDesign to a PDF form. If so, is there a particular way I would need to set it up in InDesign to transition it as layers to a PDF form? Also, being a greenhorn in scripting in Acrobat, I found a custom Validation script to reveal a hidden layer. Still, it is said that if the document is saved and reopened, the layer would be hidden (and would the input data be lost?) Below is the script, along with a link to the forum I found it on. How can I optimize it to save with the layer still visible? I greatly appreciate your help!

      <code class=" language-javascript">var ocgArray = this.getOCGs();
      for (var i=0; i < ocgArray.length; i++) {
      	if (ocgArray[i].name=="Layer 2") ocgArray[i].state = (event.value=="Option 2");
      	else if (ocgArray[i].name=="Layer 3") ocgArray[i].state = (event.value=="Option 3");
      #6921 Reply

        Hi Teagan,

        To export an InDesign file to PDF and keep the layers intact (so that you can show and hide them in Acrobat), make sure to check the box “Create Acrobat Layers” in the “Export to Interactive PDF”.

        As for a script that will show and hide layers based on user input, check out this video: https://youtu.be/BJnbCDmbGEM

      Viewing 2 posts - 1 through 2 (of 2 total)


      Reply To: How to utilize layers in InDesign to export through FormMaker as layers in a PDF
      Your information: