How can I calculate the selected checkboxes?

  • paikea
    Asked on July 17, 2021 at 10:19 PM

    How can I do the following? Have a set of checkboxes (or yes/no questions) and when they check one of them, it adds a point to a bucket. Each checkbox goes to a bucket, and there are 5 buckets. So in the end, I want to know how many items they checked for each bucket.

  • Ahmed_S
    Replied on July 18, 2021 at 7:02 AM

    Greetings,

    Thank you for contacting JotForm Support.

    If I'm getting you correctly, then you can set the calculation values (points) for the checkboxes as mentioned in the guide, and then add 5 calculation widget fields so each widget will represent a bucket to calculate the values of the checkboxes assigned to this bucket.

    Please check the below demo form, In this form you will see that Group 1 is assigned to Bucket 1 which will calculate the points of selected options of this group and so on with the rest of the groups.

    https://form.jotform.com/211982502161045

    You can clone this form to your account so you can review it in the Form Builder, please follow this guide for the instructions.

    How to Clone an Existing Form from a URL

    Please let us know if you need further assistance, we are happy to help.


  • paikea
    Replied on July 18, 2021 at 4:58 PM

    That's almost perfect except that all the checkboxes for each bucket would be mixed up, so all the options are together. Say first checkbox (individual checkbox, not the set of options) goes to bucket 5, second checkbox goes to bucket 3, etc.

    "Check all that apply":

    1. option 1 --> goes to bucket 5
    2. option 2 --> goes to bucket 3
    3. option 3 --> goes to bucket 5
    4. option 4 --> goes to bucket 2
    5. and so on
  • Ahmed_S
    Replied on July 18, 2021 at 7:04 PM

    Greetings,

    Thank you for this detailed information, please allow me some time to apply the described flow to a new demo form and will get back to you shortly.

    Thank you for your patience.

  • Ahmed_S
    Replied on July 18, 2021 at 8:01 PM

    To apply this scenario we are still using the Multiple Choice fields for the options and the Calculation Widgets for the buckets, but the workaround that we will make here is to set every multiple choice filed with only one empty option and assign the calculation value for this option, we are doing so because the calculation widget get the value of the entire field (the value of all its selected options), so once we set every field with a single option we can choose these options individually for the calculation according to the mapped bucket.

    Please check the below screen cast for how to set the options.

    1626652315 60f4be9b9179b screen Screenshot 10

    And this screen cast for how to set the calculation widgets (the buckets).

    1626652357 60f4bec572008 screen1 Screenshot 21 Please check the demo form in this link https://form.jotform.com/211986985151063, give it a try and let us know how i works with you.


  • paikea
    Replied on August 2, 2021 at 11:14 AM

    Thanks, that looks like it will work.

    Another question: is there a way for the options not to be sent to the email, just the bucket calculation?

  • Niko_N
    Replied on August 2, 2021 at 2:16 PM

    Greetings,

    Yes, that's quite possible.

    You can edit the template for the email notification and remove the Multiple Choice field and leave only the calculation field.

    Guide: https://www.jotform.com/help/430-how-to-edit-the-email-template-for-notifications-and-autoresponders

    Thank you!

  • paikea
    Replied on August 2, 2021 at 2:18 PM

    That's perfect, thanks

  • paikea
    Replied on August 3, 2021 at 10:01 AM

    Not related to the original question:

    can I prevent others to copy my form? that is, since they'll have the address, can they not be able to clone the form from my URL?
  • Collin_S
    Replied on August 3, 2021 at 1:02 PM

    Hi,

    I have split the tread for the new question, please see the following tread:
    https://www.jotform.com/answers/3263768-how-to-secure-my-form-from-cloning

    Have an amazing day.

  • paikea
    Replied on August 4, 2021 at 9:16 PM

    Thanks.

    Now back to the buckets and checkboxes. I have 270 checkboxes, and 9 buckets. Is there a way to be able to paste the calculation say #field-id-1 + #field-id-2, etc instead of manually having to select the field from the list? It is very error prone when you have so many fields to pick from. Also, it isn't showing the name I gave the fields, so it is almost imposible to determine which checkbox it is I need to select. I am talking about this widget

    1628126077 610b3b7dd2999 Screen Shot 202 Screenshot 10

  • Niko_N
    Replied on August 5, 2021 at 4:23 AM

    Greetings,

    Unfortunately, currently, there's no other option but manually entering fields into the form calculation widget.

    As for the names, they should be displayed according to your form field names. You may try to rename form fields and check. As for the names being partly visible, you can hover over the mouse cursor for 1-2 sec and the full name should be displayed.

    Thank you!