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

Scripting a Radio or Check Box to Populate Another Field

prander
Registered: Nov 6 2008
Posts: 44

On either a radio button or check box, I would like for a specific value to pop up in a text field based on the radio/check choice. E.g. there are different values for "outstanding," "commendable," "average," "below average" and "unacceptable." If the user checks "average" I'd like the score "9" to pop up in a separate text field.

I have a preference to use radio button because I don't want people to choose 2 boxes simultaneously.

My Product Information:
Acrobat Pro 8.0, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Have you read Thom Parker's [url=http://www.acrobatusers.com/tutorials/2007/js_radio_check_box/]Creating Radio CheckBoxes[/url]?

If you set the "Export Value" you only need to reference the radio buttons field value.

George Kaiser

prander
Registered: Nov 6 2008
Posts: 44
Thanks.
This helps me fake out a check box, but I'm still wondering about scripting each box to provide a specifc value for another text field.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
In the other field you only need to set that field to the value of the radio button. In Acrobat you might want to add some code to trap the unselected state which has a value of "Off".

George Kaiser