Skip to main content
Participant
March 23, 2020
Question

Auto-populate form fields when a check box is ticked

  • March 23, 2020
  • 2 replies
  • 1139 views

Opening Statement - I'm new to JavaScript in Acrobat. I have researched and read many posts on how to to do this. I'm not having any luck getting it to work.

 

I have a simple form with 2 checkboxes and numerous text fields. If the user selects checkbox A all the form fields in section B get the input of N/A and the section A text fields are fillable.

 

If the user selects checkbox B all the form fields in section A get the inpiut of N/A and the section B text fields are fillable.The biggest problem I've had is where to place the javascript - on the checkbox or the text box.

 

Thanks in advance.

 

 

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
March 24, 2020

Use a MouseUp action, "Run a JavaScript".

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Bernd Alheit
Community Expert
Community Expert
March 23, 2020

Put the scripts on the checkboxes.

Participant
March 23, 2020

Could you point me to an example of the javascript code? or a PDF example?

 

Bernd Alheit
Community Expert
Community Expert
March 23, 2020

There are many examples in this forum.