These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Looking to check/uncheck multiple checkboxes FROM combo box or field

Jape77
Registered: Mar 28 2009
Posts: 5

Hi, supernoob here, and I'm trying to get Acrobat forms to do something that is the reverse of the usual process. (I'm using Acrobat Professional 7 on OSX 10.4)

I have a pulldown menu in a combo box with 18 items, and when the user selects one, I want it to populate 4 text fields AND turn on a set of multiple check boxes that are part of a diagram. Each item will have its own combination of checkboxes that will be checked.

Now -- I've figured out how to create an array and the text fields fill exactly as they should, but I cannot figure out how to turn on and off the checkboxes.

Again, to clarify, I want the action to check and uncheck the check boxes, not the other way around. Any help or code would stop me from banging my head against the wall. Thx!

My Product Information:
Acrobat Pro 7.0, Macintosh
nixopax
Registered: Feb 6 2009
Posts: 105
this.getField("Checkboxname").value = "Off";
That will turn it off. Similarily, change the value to the value of the checkbox/radio button and it will select that.

this.getField("Checkboxname").checkThisBox(0,true);
Another option for you too. 0 is the instance number. If it's a checkbox, then you can set it to false and uncheck it. If it's a radio button, it cannot be unchecked with this method.

Here's a helpful reference:
http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf
Jape77
Registered: Mar 28 2009
Posts: 5
Hi, thanks for the reply, but still no go.

If I put in the 'on' code for a certain number of boxes when the first item is selected, they turn on -- which is what I wanted. BUT -- then all the first item boxes still get checked when I select a different item in the combo box, regardless of the code I put into the rest of the array (and before you ask, yes, all the checkboxes are named differently.)

I tried putting in the 'off' code for some of the item #1 checkboxes in the later arrays, thinking that would turn off the checkmark, but all that does is keep them from turning on in the first place. Clearly I'm not putting the code in the right place.


Here's what I'm trying to do: There are 15 checkboxes on a diagram in the PDF. When the user selects the 1st combo box item (in this case it's "Motorcycle"), 10 of the boxes get checked. When they select the 2nd item ("Sports car"), 9 boxes get checked, and so on. "Formula" gets 3 boxes check, for instance. There are 18 different vehicle types on the drop down list, and most of them get a different set of checkboxes marked when the item is selected.

Thanks again for any ideas on this and your patience.