The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Count checked boxes in repeatable section

Labels

This Discussion is public

Notifications

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">
jQuery(document).ready(function($){
$('input[name="item_meta[339][]"]').change(function(){
var val1 = $("input[name='item_meta[339][]']:checked").length;
$("#field_f7ib4").val(val1);
$("#field_f7ib4").change();
});
});
</script>

Discussion closed.