How to count checked checkboxes in a matrix table?

  • poudreriver
    Asked on December 17, 2016 at 9:56 AM

    I am trying to count how many checkboxes are checked in a matrix.

    It is the attendance sheet here: https://form.jotform.com/63495321047152

    I am trying to figure out how I can set the value of each checkbox to 1. I know that I can insert 1, but I don't want that to show in the headers. If I hide the headers, then the months can't show. I need to be able to show the months across the top. Do you have any suggestions for how I an do this?

    Thanks!

  • Mike_G JotForm Support
    Replied on December 17, 2016 at 2:29 PM

    I have checked the link to your form and it is already been deleted.

    Anyway, for you to be able to count checked checkboxes in a matrix table, you can do the workaround below.

    First, create your matrix table.

    How to count checked checkboxes in a matrix table? Image 1 Screenshot 70

    Next, set calculation values for each cell (matrix sub-fields) in the table following the instruction that is shown in the image below.

    How to count checked checkboxes in a matrix table? Image 2 Screenshot 81

    Save the changes in the Matrix table wizard. Then, add a Form Calculation Widget on the form that would serve as your counter.

    How to count checked checkboxes in a matrix table? Image 3 Screenshot 92

    The Form Calculation Widget wizard will open automatically once you added the widget to your form. However, if you would like to open it manually, you can click the "wand" icon that's on the top-right-corner of the field.

    How to count checked checkboxes in a matrix table? Image 4 Screenshot 103

    Now, on the wizard, add the cells (matrix sub-fields) of the matrix table to be used in the computation. You will be able to select each cell (matrix subfields) if you add the matrix table to the computation area using the "Add Field" button from the calculation pad from the right.

    Here's how:

    How to count checked checkboxes in a matrix table? Image 5 Screenshot 114

    Then, use the "+" (plus sign) from the calculation pad of the wizard to add the subfields of the matrix table in the computation area.

    How to count checked checkboxes in a matrix table? Image 6 Screenshot 125

    Lastly, save the changes in the wizard and save your form then test it. Below is a link to a form where I have applied the workaround above.

    https://form.jotform.com/63515180152953

    I hope this helps. If you need any further assistance or you have questions, please feel free to contact us again anytime.

    Thank you.

  • poudreriver
    Replied on December 17, 2016 at 2:35 PM

    Thank you so much.  I apologize for deleting the form before you could respond.  I realized that I would not need the form after all.  I do appreciate your answer in any case.  When I had done what you showed (at least I thought I had) I was getting "0" for each field.  I believe that I may have had the text value in the calculation instead of a numeric value.

     

    Thanks again.  I may need this again in future.