How do I increase value of hidden field depending on a radio button answer?

  • Profile Image
    plateausteve
    Asked on February 16, 2017 at 10:02 AM

    Hello. I would like to make a personality quiz on JotForm. 

    When a respondent selects "I agree" radio button, I would like to increase each possible result by a number 0-5. When "I disagree" is selected, a different number is added to the result. I am looking for a way to add a number to a hidden field to based on the answer to the radio button question. What would be the best way to do this? I have tried the conditional logic settings but haven't gotten it to work yet.

    Thanks!

  • Profile Image
    Mike
    Answered on February 16, 2017 at 12:31 PM

    This is possible to assign a specific value to each radio button selection, and then sum all the Radio Button fields using Form Calculation widget field. Please take a look at the following guides.

    1) How to Assign Calculation Value

    2) How to Perform Form Calculation Using a Widget

    If you need any further assistance on this, please let us know.

  • Profile Image
    Steve
    Answered on February 16, 2017 at 01:55 PM

    Thanks, Mike. But what if I want the same answer to result in adding different amounts to each hidden field? So selecting "I agree" adds 5 to one variable, 3 to another variable, 1 to another variable. There will be 9 possible results, each with a different value depending on the sum total of the answers to the questions.

     

    Thanks!

    Steve

     

  • Profile Image
    Mike
    Answered on February 16, 2017 at 03:31 PM

    I think that you cannot simply add a value to the hidden field. You will need to use multiple hidden fields after each radio button, and then sum them. Please check the next thread to see if something similar might be used in your case.

    Calculating personality type on survey form