Hello everybody,I have a web form and I need to do input validation for some fields.
either check if the field is empty (this is for fields like name,adresse…).
Or check the validity of the data entered (Name, Age, etc.)
I tried this piece of code for the age field, which I have placed in the JS Header:
function Validate()
{
if((document.forms[0].Child1.value != "")&&(document.forms[0].ChildAge1.value == ""))
{
alert("Please indicate an age for the child you have listed");
document.forms[0].ChildAge1.focus();
return false;
}
else
{
return True;
}
}
Then in the on submit event I put :
return Validate();
It doesnt work.
I’m using the following Notes code under a button when attempting to submit the document, and have my Db Properties generating JS on pages:
@Command([FileSave]);
@Command([FileCloseWindow])
TIA for any assistance