I have a field that must be > than the current date. I have the validation working correctly and displaying a message when it fails. However, the user can click on the next field without resolving the validation failure. How can I prevent the user from exiting the field until the issue is resolved and the correct data entered.
I am using Livecycle 8.0
I have this script in the validation event for the field to test (DateRequested)
DateRequested.rawValue>DateNow.rawValue;
Any help is greatly appreciated!
Here's some code for one technique:
Place this code in the Validate event
It saves the test result in a variable attached to the field object, and if the validation fails it forces the Exit event code to be called.
Place this code in the Exit Event
This code forces the focus to stay on the field until a valid result is entered. It's a bit obnoxious though since it takes control away from the user.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script