Check combo for "empty" fields
Currently working on a script for the verify empty fields before printing to give a warning.
what i purloined and modified from the forum was
// check for empty fields
var emptyFields = [];
for (var i=0; i<this.numFields; i++) {
var f= this.getField(this.getNthFieldName(i));
if (f.type!="button" && f.required ) {
if ((f.type=="text" && (f.value=="" || f.value==" ")) || (f.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name);
}
}
if (emptyFields.length>0) {
app.alert("Important - You must fill in the following fields or your reimburstment will be delayed:\n" + emptyFields.join("\n"));
} else this.print();
I need to add for it to check combo boxes for the answer "-" as that the default setting or empty setting. Is that possible?
