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

Validation

NancyM
Registered: Sep 25 2006
Posts: 40

How or can you make a hidden textBox mandatory if the checkBox associated with the hidden field is checked? I am using LiveCycle that is included with Acrobat Pro 7.0.9. To go into more detail.
There are 3 checkBoxes, one is required to be check. Depending on which box has been checked a invisible textBox will appear, and needs to become a mandatory field.

My Product Information:
Acrobat Pro 7.0.9, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Mandatory for what? To submit data? You can include a script in the submit button, or whatever other action this field is required for, that tests for the field's value.

There is also a Mandatory "null" test property for fields in LiveCycle forms. If it is set to "error", Acrobat will display a popup message set by the "mandatoryMessage" property of the field.

you could have check box code that looks like this
if(..check on...)
{
myField.presence = "visible";
myField.mandatory = "error";
myField.mandatoryMessage = "Must Fill"
}
else
{
myField.presence = "invisible";
myField.mandatory = "disabled";
}

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script