I have 60+ checkboxes all with unique names, how can I get a count of how many are checked?


the checkboxes named 1a, 1b, 1c, 2a, 2b, 2c, etc.. 27a, 27b... add word "bed" beginning of each name if helps.

i want create text field update count every time box checked or unchecked.

thanks

it better add "bed." instead, field names "bed.1a", "bed.1b", ..."bed.27b". can array of of "bed" fields, check each one, , increment counter. custom calculate script text field like:

 

// custom calculate script

(function () {

 

    // array of bed fields

    var fa = getfield("bed").getarray();

 

    // initialize counter

    var sum = 0;

 

    // loop through fields , update counter

    (var = 0; < fa.length; += 1) {

        sum += fa[i].value !== "off" ? 1 : 0;

    }

 

    // set field's value sum

    event.value = sum;

 

})();



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support