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

Counting ticked checkboes

New Here ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

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

Views

92

Translate

Translate

Report

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

Copy link to clipboard

Copied

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;

 

 

Votes

Translate

Translate

Report

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