How to count all the "Yes" answers from 20 questions?
I have created a PDF form with 20 questions answerable with "Yes" and "No".
At the end of the form, I want to count the number of all "Yes" answers.
Thanks in advance.
Henry
I have created a PDF form with 20 questions answerable with "Yes" and "No".
At the end of the form, I want to count the number of all "Yes" answers.
Thanks in advance.
Henry
Your fields are not named anything like what you described...
For the first group use this code:
var total = 0;
for (var i=11; i<=15; i++) {
var fname = "Question" + i;
var f = this.getField(fname);
if (f.valueAsString=="Yes") total++;
}
event.value = total;
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.