Hi,
I have a validation for date field such that Date 2 should not be before Date 1 else pop up an error message.
I want this to be applied on Edit screen. With the live fields i get the error message if the condition fails but once i change to correct value still the error message is appearing and the script fails.
Below is my script. Please let me know what i miss and how to achieve this.
if(argv["screen"] == "edit") {
if(argv["date2"]<= argv["date1"]) {
lfShowFieldMessage("date2", "errormessage", "ERROR");
}
else
{
lfHideFieldMessage("date2");
}
}
Thanks,
Krithica
I would advise you to create a main and a hook script using the lfWatch to respond to javascript events, as explained here.
In the main script configure both the date fields to respond to a javascript event, for example, the "click" event as a date is commonly selected from the box by clicking (Or pick any event that suits your needs better).
In the hook, script use the code you are currently using.
The code will be executed each time someone clicks the screen. So it should reevaluate once you do select the correct dates and hide the message again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Happy I was able to help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.