Skip to main content
bhavanis7962140
Participant
June 30, 2019
Question

Hi,

  • June 30, 2019
  • 1 reply
  • 253 views

Kindly answer the code to find empty fields only in current page out of many page in PDF..

The below code works well for all page. But i require only for current page which i'm using at that time.

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"));

}

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
July 3, 2019

You can check the property page of the field.