What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How do I increase value of hidden field depending on a radio button answer?Asked by plateausteve 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.
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.
If you need any further assistance on this, please let us know.
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.
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.