Using radio buttons to set the value of a text field

Avatar

Avatar
Validate 1
Level 1
Cindy_Pao
Level 1

Likes

0 likes

Total Posts

22 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Cindy_Pao
Level 1

Likes

0 likes

Total Posts

22 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
Cindy_Pao
Level 1

04-08-2011

I have a set of three radio buttons on a form (a performance evaluation). If I select the "1" button, I want 1 to populate in the text field. The same goes for "2" and "3"

I have not been able to code the buttons correctly for this scenario, and can't figure out how to do it.

From a previous post, I was able to get check boxes to do what I want, but they won't really work because I can't set them so that only one back may be selected.

Can this be done?

Thanks!

View Entire Topic

Avatar

Avatar
Give Back 3
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct reply

10 solutions
Top badges earned
Give Back 3
Give Back
Validate 1
Boost 5
Boost 3
View profile

Avatar
Give Back 3
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct reply

10 solutions
Top badges earned
Give Back 3
Give Back
Validate 1
Boost 5
Boost 3
View profile
past-tense
Level 2

05-08-2011

The information for this specific case isn't anywhere. The best that you can do is understand what triggers each of the events, then ask yourself which of those triggers are pertinent to your current issue.

http://help.adobe.com/en_US/livecycle/es/LiveCycle_Designer_Scripting_Basics.pdf ...

The above link contains a great deal of information regarding how to use scripts within Livecycle Designer. The section that you would be most interested in in order to learn about the available events can be found under "Events >> List of Events".

You needed to use the initialize event so that the text field would be updated when the document was opened. This ensure that the text field has the value of the default radio button when it is opened for the first time.

You needed to use the change event so that, when the use selects a different radio button, the text field is updated with the new value.

That's about it. That PDF file that I link to above is a bit long, but it's a great place to get a good grasp of the basics of scripts.

If you have any further questions, feel free to ask. 😃 Have a good one.

- Scott