JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
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.
Regarding the Yes or No ButtonAsked by toclimateres on November 15, 2016 at 05:03 PM
X is a drop down menu with 9 different options.
Y is a YES or NO Button. If Y=YES, then Y = 0; if Y=NO, then Y will take a some value based on the 9 different options of X.
I just want to make sure there is no way to get around using 9 DIFFERENT if-statements for scenario, meaning that I can not combine them into 1 if-statement. I am asking because I want to have maybe 10 different YES or NO Buttons, which means I will probably end up with 90 different if-statements.
Not sure if I understood what you mean, but here is my example based on the logic you have provided:
1) If you have a drop down field with 9 options, assign a value to each option: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value
2) Then I guess you will be using a radio button for the "yes or no" question.
3) To obtain the result add a Form Calculation field:
4) Create the following conditions:
So, I believe it will only take two conditions based on the scenario you described. Let us know if you need more help.
Hi BDAVID, thanks for the speedy reply! Let me try again.
X is a drop down menu with 4 different options.
Y and Z are YES or NO Buttons.
If Y=YES, then Calc_Y = 0, regardless of the value of X
If Y=NO and X=Option1, then Calc_Y = 1
If Y=NO and X=Option2, then Calc_Y = 2
If Y=NO and X=Option3, then Calc_Y = 3
If Y=NO and X=Option4, then Calc_Y = 3
If Z=YES, then Calc_Z = 0, regardless of the value of X
If Z=NO and X=Option1, then Calc_Z = 3
If Z=NO and X=Option2, then Calc_Z = 7
If Z=NO and X=Option3, then Calc_Z = 6
If Z=NO and X=Option3, then Calc_Z = 8
Like the following:
I just want to make sure there is no way to get around of using 8 (4*2=8) DIFFERENT if-statements for the scenario. Because I want to have 10 YES-or-NO buttons, which means I will end up having 40 if-statements.
From the looks of your setup, it would require a one condition per output. I do not see a way to do this with calculations alone that would reduce the number of statements that would need to be made.
Okay, thank you David!