Answered
Hi,
I have a form where we want the user to fill in the number of hours that they worked on a project. If the value is <=4 then I want Box A to be automatically ticked. If the value is >4 then I want Box B to be automatically ticked. If no hours are recorded both tick boxes should be blank
Appreciate the help!
Brenda
If this is an AcroForm, and the Boxes are check boxes, then this script will work when placed in the custom format script for the hours field
if((String(event.value) == "") || (event.value == 0))
{// No Entry
this.getField("BoxA") = "Off";
this.getField("BoxB") = "Off";
}
else if(event.value <= 4)
{
this.getField("BoxA") = "Yes";
this.getField("BoxB") = "Off";
}
else
{
this.getField("BoxA") = "Off";
this.getField("BoxB") = "Yes";
}
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script