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

Mandatory checkBoxes

patra
Registered: Oct 19 2006
Posts: 270

I have a form with several mantatory text fields and two check boxes(Yes - No).

One of the check boxes is required!

How I can validate the check boxes in case the user forgot to check one of them?

Thanks

My Product Information:
LiveCycle Designer, Windows
madhu_livecycle
Registered: Jun 23 2009
Posts: 13
Hi patra,

first you select the Check Box which you want to make mandatory,
then go to Object pallete and Binding Tab check the On Value and Off Value

for Example if On Value = 1 and Off Value = 0

the script to check the mandatory condition whether the check box is checked or not is

if ( CheckBox1.rawValue == 1 )
{
xfa.host.messageBox("Check Box Selected");
}
else
{
xfa.host.messageBox("Please Select the Check Box");
}

place the above script for Button in Event "Click" and Script Language "JavaScript"


Thanks,
Madhu.