• Hi – On a form with multiple checkboxes is it possible to add the total amount of checkboxes that have been selected? I found some javascript code that can add the checkboxes, but not how that total can be submitted. Here is the javascript I found for adding check boxes.

    [checkbox GRCGA class:multipal use_label_element "$10.00" "$20.00" "$25.00" "$50.00" "$75.00" "$100.00" "$200.00" "$400.00" "$500.00"]
    
    Total Amount: <span id="total">$00</span>.00
    <script>
            $(document).ready(function() {
    $("input[type=checkbox]").on("change", function() {
        var tot = 0;
        $("input[type=checkbox]:checked").each(function() {
           var val = this.value.substr(1).split(' ')[0];
    tot += +(val);   
     });
             $("#result").text("Total: $" + tot);       
          });
            });
        </script>
  • The topic ‘Add and submit number of checkboxes selected’ is closed to new replies.