Copy link to clipboard
Copied
Hello,
I am hoping to get some suggestions for the following:
Example: I have a ListBox with multiple selections enabled. Let's say the values are ITEM1, ITEM2, ITEM3, ITEM4. Now say I have 4 CheckBoxes (Labelled: ONE, TWO, THREE, FOUR) that will be checked depending on which ListBox items are selected. So if the user selects ITEM2 and ITEM4 from the ListBox, the respective CheckBoxes TWO and FOUR will be checked.
Any idea on how to accomplish this? I am sorry if this is a novice question however I am not the most advanced user.
Thank you
Louis
Copy link to clipboard
Copied
What do you know about JavaScript? The solution you need is a bit complex, and if you don't know JS you'll never get there. The key piece of info you need for a solution is that the indexes of the selected items are in the "currentValueIndices" property of the List Field. You'll need to come up with a way to relate the items in the list box to the checkboxes. A good way to do this is to incorporate the values of the list items into the names of the checkboxes.
I would suggest you start by reading this article:
https://acrobatusers.com/tutorials/list_and_combo_in_lc/
You'll find more information and tons are examples and tutorials on programming lists here (paid for site):
https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm
Copy link to clipboard
Copied
Thank you Thom. I have some knowledge of JS. I have been learning as I go and have quite a bit of script in my forms. I will take a look at what you sent.
Thanks again
Louis
Find more inspiration, events, and resources on the new Adobe Community
Explore Now