I currently have a form that contains buttons labeled "". When the user clicks on these buttons, a calendar appears. The user selects a date from the calendar and the caption on the button changes to reflect the date the user picked. I want to force the user to select a dat and not leave the caption "". Below is the code I tried putting on the On Blur event of the button, but it is not working. How can I for the user to select a date?
// Form Validation, the out code below identifies fields that
// are not ready for submission and reports the errors
var patternEmpty = /^\s*$/;
var strMissing = "";
if(patternEmpty.test(this.getField("dateField.0").caption ==””))
strMissing = "dateField.0";
else
{ // All is ok, submit the data
console.println("All form data ok");
}
if(strMissing.length)
{// Got an error
app.alert("Missing Form data in field: " + strMissing);
}
Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools
Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com