Answered
How to select at least two from a list of checkboxes?
Hi again Nesa,
You have provided a solution for selecting only two from a list of checkboxes. And for that, I thank you.
Here is the script you have provided ...
var boxes = [];
for (var i=1; i <=7; i++) {
boxes.push(this.getField("CB" + i));}
var offBoxes = boxes.filter(function(f) {
return f.valueAsString === "Off";});
var readonly = (offBoxes.length === 5);
offBoxes.forEach(function(f) {
f.readonly = readonly;});
But the requirement has changed. Instead of Select only two from the list, it is now Select at least two.
How would the scipt be if this is now the requirement. Thanks.
