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

preselect radio button based on field value. Is that possible?

dasmits
Registered: Jan 29 2010
Posts: 19

Hello All,

I have 5 different radio buttons on my adobe form. they all have same name (patrel[0]). but they each have different export values. there is a field on my form (HINC010[0]) which is fed from a sql stored procedure. I want to evaluate the value in HINC010[0] and then select the appropriate radio button.

I thought this would be fairly easy as I've been able to successfully do stuff to one field based on the value of another field...but its harder with radio buttons.

Heres what I have so far (and this works on my system). however, when I deploy the form the HINC010[0] field gets all weirded out. the properties for the HINC010[0] field are missing a bunch of the sub menu tabs which are usually there :-(

The code below is found in the custom calc section of the HINC010[0] field:

var patrel = this.getField("patrel[0]");
if (event.value == "Self")
patrel.value = "Self";
else
if (event.value == "1")
patrel.value = "spouse";
else
if (event.value == "2")
patrel.value = "child";
else
if (event.value == "parent")
patrel.value = "parent";
else
if (event.value == "other")
patrel.value = "other";
else
patrel.value = "No";

I would love some help from the group with this one.
Thanks in advance!

My Product Information:
Acrobat Standard 9.0, Windows
dasmits
Registered: Jan 29 2010
Posts: 19
uh oh, this is not a good sign. 49 views and no suggestions yet :-) I've searched high and low but still have not found a solution. maybe what I'm trying to do is not possible :-(