How can I count the options selected in radiobuttons?

  • Profile Image
    Edanguz
    Asked on October 13, 2017 at 01:27 PM

    I have a form with many questions and 3 specific options for the questions; when I clic in the SEND button, create a PDF in my google drive with the information.

    I want to count

    How many "yes" options selected

    How many "no" options selected

    How many "maybe" options selected 

    And print in the PDF.

     

  • Profile Image
    david
    Answered on October 13, 2017 at 02:44 PM

    For this, I would recommend using an input table field:

    1507919446Capture.PNG

    Assign calculation values to the options in the table:

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

    A value of 1 for each option will work for your purposes.

    Then use calculation widgets to total up the choices for each:

    https://www.jotform.com/help/414-Calculate-Values-in-the-Input-Table-Through-Condition

    Here is an example form to show how it would work:

    https://form.jotform.com/72855636052965

  • Profile Image
    Edanguz
    Answered on October 13, 2017 at 03:18 PM

    wow thanks, but you are using check box; it can't with radiobutton?

  • Profile Image
    david
    Answered on October 13, 2017 at 03:25 PM

    It can be radio button but when using calculations on input tables, radio buttons cannot add up specific columns.  I can think of other workarounds you could use but they would like involve adding quite a bit more fields to the form and setting up several conditional statements.  Something like adding a number field per option in the form, then conditionally updating those fields. 


  • Profile Image
    david
    Answered on October 13, 2017 at 03:25 PM

    It can be radio button but when using calculations on input tables, radio buttons cannot add up specific columns.  I can think of other workarounds you could use but they would like involve adding quite a bit more fields to the form and setting up several conditional statements.  Something like adding a number field per option in the form, then conditionally updating those fields. 


  • Profile Image
    Edanguz
    Answered on October 13, 2017 at 03:33 PM

    ok I don`t know how to do that; where can I read about that.

    Thanks.

  • Profile Image
    david
    Answered on October 13, 2017 at 03:45 PM

    For that setup, add a number field for each one of your field options:

    1507923412Capture.PNG

    Then, set up a condition for each option to update the number field with a 1 if the option is selected:

    https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Calculation-into-a-Field-Using-a-Condition

    1507923502Capture1.PNG

    1507923598Capture2.PNG

    You can then add up those fields using a calculation field:

    https://www.jotform.com/help/259-How-to-perform-calculation-in-the-form

    I set up the first couple fields in my test for to show how it would work:

    https://form.jotform.com/72855636052965

    You can clone the form to your account if you would like:

    https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL