I have tried adding dropdown lists to the following check without success
Hi
I have the following javascript in a button before a form is ready for signature which is working, which I have found on various forums. However, I need to include 2 more items
1) to include checks on dropdown lists if they are visible and required, the default value of these dropdown lists are "SELECT ITEM",
and
2) if possible I would like to have an additional message displayed if a certain checkbox called divur1 is not ticked before displaying the main message which is included in my script below
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.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name);
}
}
if (emptyFields.length>0) {
app.alert("Error! You must fill in the following fields:\n" + emptyFields.join("\n"));
} else {
// actions to complete when all required fields completed.
app.alert("Congratulations, all fields completed, Choose your name below and Digitally sign the form. DID THE CUSTOMER AGREE TO MARKETING EMAILS IF YES PLEASE CHECK THE BOX UNDER CONTACTS IS TICKED otherwise continue");
}
this.getField("Dropdown28").display = display.visible;
this.getField("Reset").display = display.hidden;
