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

Combo box activating check box

jsmee2000
Registered: Oct 24 2009
Posts: 4
Answered

I am using Adobe Acrobat 8 Professional to create a form. I have a combo box labeled "PhD Degree" with three options in it. The first two options are labeled "EE", "CompE" and have an export value of 1. The third option is labeled "OTHER" and have an export value of 0.

If "OTHER" was selected I wish for one of these outputs:

1. a check box that was invisible appears with the box checked
2. an always visible check box whose status is always unchecked... becomes checked.

Any help would be appreciated.

My Product Information:
Acrobat Pro 8.1.7, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
All list items should have different export values. Do not set the first two Items to 1

The basic idea is to manipulate the check boxes when the user makes a selection. There are several options for doing this, but the easiest is to use the "Validate" Script. Take a look at this article:

http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/

First, in the options tab for the combobox select "Commit selected value immediately"
Next, Add a validate script for setting the check buttons based on the selection. The selection value is availible in the "event.value" property.

The script should look something like this:
if(event.value == "OTHER"){this.getField("Check1").hidden = false;  // Unhide checkboxthis.getField("Check2").checkThisBox(0,true); // Check checkbox}else{// Restore valuesthis.getField("Check1").hidden = true;  // hide checkboxthis.getField("Check2").checkThisBox(0,false); // unCheck checkbox}

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jsmee2000
Registered: Oct 24 2009
Posts: 4
Thank you very much. Your advice was quite helpful.