How to put multiple text fields into an array list?
Hi guys before continuing i must say that I'm very new to Adobe javascript and his community,this is my first question.
I am making a form with acrobat pdf at the last part of the module I put a "save" button linked with an action when pressed the mouse,before doing its task, It's check also if all fields are full or not.
There are some specific text fields that are not required..
So my question is How can i put them into an array list and then delete them? for example with splice(); method?
var emptyFields = [];
for (var i=0; i<this.numFields; i++) {
var f= this.getField(this.getNthFieldName(i));
if(f.type=="text" && f.value=="") { emptyFields.push(f.name);
}
}
if (emptyFields.length>0) { app.alert("Errore! è necessario compilare i seguenti campi obbligatori:\n" + emptyFields.join("\n"),0);
}
else{ app.alert("Tutti i campi sono stati compilati con successo!",3);
//here then I can save the document form
}
This is the first part of the code
