Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
21

Counting ticked checkboes

New Here ,
Feb 02, 2024 Feb 02, 2024

I am trying to figure out how to have my fillable PDF count how many check boxes are ticked off.

There are a lot and already have scipt for calculation totals based on indivdual values already assigned...

TOPICS
Create PDFs , JavaScript , PDF forms
165
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 02, 2024 Feb 02, 2024
LATEST

You didn't give us enough info to go with. Let's say you have named your checkboxes in sequence,

Check Box1-5 for example, you can use this custom calculation script in a text field to count how many checkboxes are checked:

 

var Checked = 0;
for(var i=1; i<=5; i++){
var check = this.getField("Check Box"+i).valueAsString;
if(check !== "Off")Checked++;}
event.value = Checked;

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines