Skip to main content
Participating Frequently
April 12, 2024
Question

check box count continued on PG 2

  • April 12, 2024
  • 1 reply
  • 300 views

I am trying to continue a count on page 2 of a document.

PG 1 works fine and I get a total on the bottom of the page.

I need to have the box show the total from both pages

 

currently there are 24 checkbox on pg 1,  C 1 - C 24

                                                              pg 2, C 25 - C 48

 

var total = 0;

for (var i=1; i<=24; i++) {

    if (this.getField("C "+i).value!="Off") { total++;

    }

}

event.value = total

                                                            

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
April 12, 2024

If you want to count all checkboxes change i=1; i<=48, if you want to count only boxes on second page change: i=25; i<=48.

You could also give all checkboxes export value of 1 and then in total field go to 'Calculate' tab and select 'Value is the' and pick checkboxes you wish to count.