- poudreriverAsked on December 17, 2016 at 09: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?
This is a re-post of a comment on How to Perform Form Calculation in the Matrix Field?
- JotForm SupportMike_GAnswered on December 17, 2016 at 02: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.
Next, set calculation values for each cell (matrix sub-fields) in the table following the instruction that is shown in the image below.
Save the changes in the Matrix table wizard. Then, add a Form Calculation Widget on the form that would serve as your counter.
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.
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.
Then, use the "+" (plus sign) from the calculation pad of the wizard to add the subfields of the matrix table in the computation area.
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.
I hope this helps. If you need any further assistance or you have questions, please feel free to contact us again anytime.
- poudreriverAnswered on December 17, 2016 at 02: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.