I feel like this is an easy issue?? but I'm not getting the Text box on page 12 (Next to the word Record) to add the check boxes.
I have an attendance roster (Page 12) and want a count of all Check Boxes checked.
I created a txt box at the top next to the word Record.
I am aware that some code dose not like spaces.
I thought it might be a syntaxes error. between “Check Box” and “CheckBox” so I adjusted the name of the boxes for the first 15 days in July to “CheckBox” . I have tried both.
// Initialize counter variable
var sum = 0;
// Loop through the fields
for (var i = 126; i < 499; i += 1) {
// Add one if check box is not Off
if (getField("CheckBox" + i).value !== "Off") {sum += 1;}
}
// Set this field's value to the sum
event.value = sum;
Ok for some reason "Check Box227" was missing, so added a "Check Box227 & Check Box499" code works great!!
counting Check Boxes SOLVED
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Stefan - PDF-XChange
-
Jeff512
- User
- Posts: 1
- Joined: Tue Mar 03, 2026 4:04 am
counting Check Boxes SOLVED
You do not have the required permissions to view the files attached to this post.
-
Sean - PDF-XChange
- Site Admin
- Posts: 736
- Joined: Wed Sep 14, 2016 5:42 pm
Re: counting Check Boxes
Hi Jeff - okay, glad you were able to resolve this. If you have any further queries, please just get in touch.
Kind regards,
Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623