Answered
Hi,
is there any way to make a checkbox on a form obligatory? So it would have a red border and e.g. clicking a submit button would cause some kind of alert if the checkbox is unchecked?
Thanks in advance
Regards
T.M.
First though, in the "Options->Binding" tab for the checkbox, delete the "Off" value, so that "off" for the check box is a null value.Next, add a text field to the document and make it required. With the text field selected switch to the XML view. Scroll down to the bottom of the text feild tab and you'll see an entry for the "validate" event. It'll have a "nulltest" property. Copy this line to the same location in the checkbox's field tag. Switch back to design view and accept the changes. Now delete the text field you created.
That's it. When the user tries to do the submit they'll get the checkbox flagged and highlighted as required, just like the other required fields.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script