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

Radio button to fill in form field

matthewatkins
Registered: Jun 29 2011
Posts: 11

I've looked over the forums but can't seem to find an answer that completely helps me with this. I'm sort of new to creating forms with Acrobat. I am using Acrobat X Pro.
 
I have a form field that needs to populate a number based on one of three other form fields. I want to select the one of three fields with a radio button. How do I do this?

My Product Information:
Acrobat Pro 10.1, Macintosh
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
You do understand how radio buttons work?

You can set the text field's value with the value from the exclusionary radio button group. Then test for a value of 'Off', indicating none of the radio buttons has been selected, and then change the field value to a null string.

// get radio button value;
event.value = this.getField('Radio Button1').value;
// null value if the value is 'Off';
if(event.value == "Off") event.value = "";

Adobe Acrobat JavaScript documentation JavaScript for Acrobat
Mozilla MDN JavaScript JavaScirpt Reference 1.5

George Kaiser

matthewatkins
Registered: Jun 29 2011
Posts: 11
I don't quite follow. I need a form field to populate based on the value in one of 3 other form fields. I need to choose that other form field with a radio button.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Do you have 3 different radio buttons?

An "exclusionary group" implies a group of radio buttons with the same name but different export value options.

When a radio button is selected it stay selected.

Check boxes can be unselected.


George Kaiser

matthewatkins
Registered: Jun 29 2011
Posts: 11
Right, 3 radio buttons with the same name and different export value. I want radio buttons because one of the three should be selected, but only one.
matthewatkins
Registered: Jun 29 2011
Posts: 11
Does anybody have a solution for this?
padobe
Registered: Jun 29 2011
Posts: 10
Hi,

It would be much simpler if you are using Adobe Designer(XDP)forms.

jenice
Registered: Jul 15 2011
Posts: 3
Yes/No Radio Buttons. I've created Yes/No Radio Buttons where the client can choose only one or the other. I'm looking for a solution to make one or the other mandatory. The client must answer one way or the other. Any suggestions? I have no experiece with JavaScript.