Connecting Checkboxes to a Dropdown list in Adobe pro
Copy link to clipboard
Copied
I have been trying to connect Checkboxes to a Dropdown list in Adobe pro. I find examples work the best
I have a checkbox beside age. If someone clicks the box I would like the dropdown list next to age to activate and they must make a selection from the list provided. If they don't click the box then I would like the dropdown list to stay at N/A. I am just having a hard time connecting the boxes to the dropdown list. Any help would be greatly appreciated. Thanks!!
Copy link to clipboard
Copied
"Enableing/Disabling" a field requires a script. There are a couple if different ways to do this. The simplest option is to hide/show the dropdown based on the checkbox value. Here's an article on the topic, and it comes with a sample PDF.
https://www.pdfscripting.com/public/Hiding-and-Showing-Form-Fields.cfm
Another more complex method is to "grey-out" the dropdown. And here's an article on that technique:
https://acrobatusers.com/tutorials/js_disabling_fields/
In your question you also imply another solution, which is to change the dropdown entries based on the checkbox.
This is a tricky one, but possible. Here's an couple of articles on modifying list and dropdown fields.
https://acrobatusers.com/tutorials/list_and_combo_in_lc/
https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm
Use the Acrobat JavaScript Reference early and often

