Expand my Community achievements bar.

adding radio button values

Avatar

Former Community Member
Hello - -



I apologize upfront -- I am completely new to livecycle, and am researching a request to see if this is a viable solution.



I have a request to create a form that consists of 10-15 sets of radio button. In each set, a selection will be made and each selection has a value attached to it (first button in set = 1, 2nd = 2, etc.). Is it possible to (again, i am completely new with this) attach values to radio buttons and have the selected values in each radio button set total in a numeric field somewhere on the form?



Thanks in advance, and i will avoid such stunning newbie-ness on the future.



-- Patrick
2 Replies

Avatar

Former Community Member
Hello Patrick,



Yes its possible.



The value assigned to each radio button is listed in the Binding tab of the Object palette. You can change them as needed. Then you can write a calculate script to display the sum of the selected options. For example:



1. Create two lists of radio buttons.

2. Select the first list and go to the Object palette, binding tab.

3. Check the Specify Item Values option.

4. Update the values as needed.

5. Rename the list (the Name edit box is at the top of the Binding tab).

6. Repeat for the second list.

7. Create a Numeric Field.

8. Open the Script Editor. If its not opened already, go to the Window menu and select Script Editor. It will pop up at the top of the application window.

9. In the Show drop-down list, select the calculate event.

10. In the Language drop-down list, select FormCalc.

11. Type the following script:



sum(rb1, rb2)



12. Preview and test the form.



Does this work for you?



Hélène

Adobe Systems

Avatar

Former Community Member
Thank you so much for taking the time to reply, and for the information. This worked perfectly.



This is great! I did not know that a program this helpful, with some pretty nice options, was available to me.



Thanks!