I have two fields: field1 and field2. Both are set as “User Entered - Required”. I am trying to enforce that they cannot be empty. I made the following routine, but when I leave field1 empty and click on the field2 (which is also empty) I get stuck in an infinite loop of the same error message from both fields.
Using FormCalc on the Exit event:
if ($.isNull) then
xfa.host.messageBox("Field cannot be blank!")
$host.setFocus ($.name)
endif
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script