Hi. I'm looking for a way to count empty text fields in a pdf form and to have the result automatically entered in another field on the same form. Thanks in advance for your help.
OK, here's a simple custom calculate script for a text field that displays the number of blank text fields that are named "num.1" - "num.10":
// Custom Calculate script
(function () {
// Initialize sum of blank fields
var sum = 0;
// Count how many fields are blank
for (var i = 1; i < 11; i += 1) {
if (!getField("num." + i).valueAsString) sum += 1;
}
// Set this field value to the sum
event.value = sum;
})();
North America
Europe, Middle East and Africa
Asia Pacific