Validation Code Assistance
I have some validation code (below) that validates fields before a user can submit the form. The code works great, with one exception; Each time it catches one of the below, the code returns to the form and designated field, as should; but also clears all fields on the the entire form?
Anyone have any ideas as to why, upon returning to the form and designated field, the form clears all data from all fields; almost as if it is resetting the form?
Here is what I am working with?
if (this.getField("Date of Loss").valueAsString=="")
{app.alert("You must enter the Accident Date in the Date of Loss field.");
getField("Date of Loss").setFocus();}
else if (this.getField("Time of Loss").valueAsString=="")
{app.alert("You must enter the Time the accident occurred in the Time of Loss field.");
getField("Time of Loss").setFocus();}
else if (this.getField("Employee Drivers Name").valueAsString=="")
{app.alert("You must enter the Employee Drivers Name in the Employee Drivers Name field.");
getField("Employee Drivers Name").setFocus();}
else
{// Submit form - sends a copy of the form...bla bla bla bla bla}

