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

script for check boxes-LiveCycle Designer

patra
Registered: Oct 19 2006
Posts: 270

I have 5 different check boxes and when a user check one of them displays a hidden field(Hidden fields are different for every check box).

I like for the user to have only one choice.

I am using the script below:

if (this.rawValue ==1)
Field1.presence = "visible";
else
Field1.presence = "invisible";

but if by mistake click a second check box the previous check box state remain ON.
How I can solve the above.

THANKs

My Product Information:
LiveCycle Designer, Windows
StevenD
Registered: Oct 6 2006
Posts: 368
It sounds like you want the user to only be able to check on of the five check boxes in which case you may have to set up the script in the check boxes so when one is checked the other four are unchecked

if(this.rawValue == 1)
{
Field1.presence = "visible";
CheckBox2.rawValue = "0";
CheckBox3.rawValue = "0";
CheckBox4.rawValue = "0";
CheckBox5.rawValue = "0";
}
etc.

Something like that. There may be a more efficient way to do this.

StevenD

StevenD