Script to count filled fields in adobe acrobat form
I am trying to make a form in which it is required to count the number of filled fields .
The fillable fields are named as FIELD1, FIELD2, FIELD3 ..... ........................FIELD 27, FIELD 28.
Below is the javascript i am using to count the filled fields.
var counter = 0;
for (i=1; i<=28; i++) {
if (this.getField("FIELD" + i).value!=="") counter++;
}
if (counter>0) {
event.value = counter;
} else event.value = "";
Everything is working fine.. except for that it also counts the fields in which spaces are put......... which i don't want.. i want if only texts or numbers are input into field then only count the fields.. .
