Script for checkbox#0 checkbox#1 not show in alert
Hello,I have found the following Javascript code (from here Re: Check to see if any field is empty) and join code && f.page =="0" to check page1, text and check box can show right, but if checkbox is same name ex:checkbox#0 checkbox#1 ,it will not showing into alert, how to identify code ,thank you for help!
var emptyFields = [];
for (var i=0; i<this.numFields; i++) {
var f= this.getField(this.getNthFieldName(i));
if (f.type!="button" && f.required && f.page =="0")
{ if ((f.type=="text" && f.value=="") || (f.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name) ; } }
if (emptyFields.length>0) { app.alert("請輸入下列欄位 \n" + emptyFields.join("\n")); }
