Skip to main content
Participant
February 12, 2019
Answered

InDesign to PDF form with checkboxes that auto check when text is entered - still editable in InDesign?

  • February 12, 2019
  • 1 reply
  • 575 views

I designed a form using InDesign and exported it to Interactive PDF.

I need to cause each checkbox to "check" when any text is entered in the text field beside it. I have over 30 checkboxes, and figured how to do this using the following code in Acrobat Pro (as a custom calculation script under the text box properties).

if (event.value=="")

{this.getField("Check Box 3").value="Off"}

else

{this.getField("Check Box 3").value="Yes"}

It seems to work, however before I repeat this 30 times for every single text box / checkbox combo, is there a way to make further edits to the layout in InDesign after adding all these custom check box actions? Do I really have to add them all each time I export to interactive PDF?

This topic has been closed for replies.
Correct answer Karl Heinz Kremer

No, when you try to place that PDF into an InDesign document, the interactive functionality will be gone. What you can do is to create a new PDF from InDesign, and then in Adobe Acrobat use the "Replace Pages" function to replace the static page content behind your form fields. That will leave the form fields intact, but will replace your page content. However, if your InDesign file still contains interactive elements, you will have to remove them before you replace the background. Based on your layout, you may have to adjust the location of some or all of your form fields in Acrobat.

As an alternative, you may be able to programmatically change your form fields after you export from InDesign. You can assign the script using JavaScript.

1 reply

Karl Heinz  Kremer
Community Expert
Karl Heinz KremerCommunity ExpertCorrect answer
Community Expert
February 12, 2019

No, when you try to place that PDF into an InDesign document, the interactive functionality will be gone. What you can do is to create a new PDF from InDesign, and then in Adobe Acrobat use the "Replace Pages" function to replace the static page content behind your form fields. That will leave the form fields intact, but will replace your page content. However, if your InDesign file still contains interactive elements, you will have to remove them before you replace the background. Based on your layout, you may have to adjust the location of some or all of your form fields in Acrobat.

As an alternative, you may be able to programmatically change your form fields after you export from InDesign. You can assign the script using JavaScript.