Count checked boxes in repeatable section


This Discussion is public


I have a form that I have working on a page and it uses the script to count the number of checked boxes. Now, I realize that I need the form to have a repeatable section and the checkboxes are in this repeatable section. I have updated the field IDs and numbers in the script but I can't get it working.

Does anyone know if this works in a repeatable section?

<script type="text/javascript">
var val1 = $("input[name='item_meta[339][]']:checked").length;

Reply to this Discussion