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

RADIO BUTTONS Sub-Names?

A1xy
Registered: Feb 7 2008
Posts: 11
Answered

Is there any way to assign a NAME & "sub-NAME" to Radio Buttons?

**** IF the RADIO BUTTONS could be given
--a NAME & SUB-CLASS eg: 3.1 3.2 3.3
 (or whatever else)
--all working in unison as button 3

--and still working as select/deselect


Would you or anyone else have an answer to this only?

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I'm not sure if this is exactly what you want, but look at this article on making a RadioCheck button.

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

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

A1xy
Registered: Feb 7 2008
Posts: 11
Thankyou

I have already been using Acrobat Forms as the Article suggests


WHAT I REALLY NEED is an ordered list of topics
to evaluate a -set- of questions

I am using Radio Buttons with export values: -2- or -1 or -0-

Respondents can choose either -2- or -1 or -0-

good poor bad
How did you feel about the performance of a -2- --- ---
How did you feel about the performance of b --- -1- ---
How did you feel about the performance of c --- -1- ---
How did you feel about the performance of x -2- --- ---
How did you feel about the performance of y --- --- ---
How did you feel about the performance of z --- -1- ---

(CALCULATION: columns + SUM) _ TOTAL -4- -3- -0- = 7


**** HOW can the RADIO BUTTONS be given
--a NAME & SUB-CLASS eg: 3.1 3.2 3.3
 (or whatever else)
--all working in unison as button 3

--and still working as select/deselect



So that I can select -individual- radio buttons
for the CALCULATIONS function


The calculations work well with COMBO BOXES
Each one has a choice of 2 or 1 or 0
But respondents could make mistakes
and choose more than 1 value per row

I prefer that they get only one choice per row = a single value per row
RADIO BUTTONS are perfect for allowing only a single selection per row

**** HOW can the RADIO BUTTONS be given
--a NAME & SUB-CLASS eg: 3.1 3.2 3.3
 (or whatever else)
--all working in unison as button 3

--and still working as select/deselect



OR How can COMBO BOXES be used as radio buttons?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I'm not sure what you are asking for. But I can explain a bit about how radio buttons work in AcroForms.

A group of radio buttons, i.e. radio buttons that have the same name, all act as a single field. They all have different export values, but field value is the same for all.

So there is no reason to structure your calculation as a set of columns. Just add up the values of the radio button groups.

But if you want, you can determine the individual on/off state of each radio button. In fact, because they are part of a group, they already have the naming convention you suggested. For example if I have 3 radio buttons all named "RadBut". Then I can get the off/on state of each buttons in the group with this code:

var bBut1On = this.getField("RadBut").isBoxChecked(0);
var bBut2On = this.getField("RadBut").isBoxChecked(1);
var bBut3On = this.getField("RadBut").isBoxChecked(2);

or with this code:

var bBut1On = this.getField("RadBut.0").isBoxChecked(0);
var bBut2On = this.getField("RadBut.1").isBoxChecked(0);
var bBut3On = this.getField("RadBut.2").isBoxChecked(0);

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