Check Required Fields, setFocus (if req) then Print Doc
I've got follow Javascript code:
for(var i = 0; i < this.numFields; i++)
{
var fieldName = this.getNthFieldName(i);
if ((
this.getField(fieldName).type!="button" && this.getField(fieldName).required==true) &&
(this.getField(fieldName).value=="" || this.getField(fieldName).value=="Off"))
{
app.alert("You must fill in " +fieldName+ " before you can submit the form.");
this.getField(fieldName).setFocus();
break;
}
}
If everthings fine the PDF should print the complete form. How can I insert the this.print string into this script.
