-
flowgenomeAsked on March 15, 2016 at 4:49 AM
Hi
My form is a personality assessment form where every response is associated with a unique personality type.
When users submit the form, I would like to display the personality type based on the most common personality type response selected by the user.
Its a simple logic but I do not see how I can use "conditional logic feature" to achieve this.
Look forward to your response.
thanks
Anton Malik
-
BorisReplied on March 15, 2016 at 7:02 AM
I see the form in question is form 60562817965466, where you are using Radio Button for collecting responses to your questions. From what I understand, each question will have an A, B, C or D type of answers, and at the end of the form, you'd like to have a count of how many A-s were selected, how many B-s, etc.
A workaround that comes to mind in order to achieve this is to use 4 different hidden fields for each of your questions, which will hold the value that is selected on that question. We can then use these individual hidden fields to count how many times answer from each group was selected.
1. First, you can simply add a Text Box field underneath each question, and add as many Text Box fields as there are options on that question. We'll make these new fields hidden, so that they do not confuse your users:
2. Now, we can use conditional logic with update/calculate rules, and set the rules to output number 1 into one of these fields, based on which answer was selected:
This way, we will be able to count the number of times each answer was selected.
3. We can use a Form Calculation field to calculate the total of each of these answers - we use one calculation for answers of type A, another for answers of type B, etc. Inside the form calculation, you would use the Add Field button to add the answer fields, and plus button to make sure they are summed:
Now, you will have all the ingredients to categorize users based on their selected questions.
4. For the last step, you can use conditions to change thank you page depending on which of your form calculations has the highest value:
You can use multiple IF rules in the same condition by using the plus sign on the right of the IF rule, and setting it so that if ALL the IF rules are matched, the condition will fire:
Please try it out, and let us know if you need any further assistance, we are here to help.
-
flowgenomeReplied on March 16, 2016 at 11:17 AM
Alright, thank you.. Seems a lot of work but I will try this
Thanks
-
mert JotForm UI DeveloperReplied on March 16, 2016 at 12:04 PM
In the name of my colleague, you are kindly welcome. Please, don't forget to let us know the final state of the issue after trying the new solution.
Best Regards.
-
flowgenomeReplied on March 21, 2016 at 9:17 AM
Hi Mert
Thanks. All looks ok except for one thing - There is a possibility that when we score the answers, 2 personality types (scores) maybe equal. In such a case since my condition is set to look for only "Greater than" what will happen?
So how I really wanted to set the condition is this way:
If Score A is max then display "Thank you Page A" but if Score A and Score B are max scores (because Score A equals to Score B) then display "Thank you Page B"..
Does this make sense?
Can you let me know how this will work?
Thanks a lot.
-
mert JotForm UI DeveloperReplied on March 21, 2016 at 9:48 AM
Hi again,
On your form, I see the different total scores like "Hard Charger Score", "Crowd Pleaser Score", so those are going to be Score A and Score B. To add the scenario that Score A equals to Score B, we need to use "Change Thank You Page" condition again.
Please, check the example setup from the below:
So, the conditions for the equality scenarios need to be added plus to the ones for "greater than" cases. I hope this will meet your needs. For further assistance, please do let us know.
Regards.
-
flowgenomeReplied on March 23, 2016 at 6:56 AM
Hi Met
It does not entirely meet my requirement. Let me explain what I mean:
So we may have a scenario where
Hard Charger Score = 4
Crowd Please Score = 2
Flow Goer Score = 2
Deep Thinker Score = 2
Now in this case clearly Hard Charger is maximum.
But at the same time if I have a condition that says "If Crowd Pleaser Score = Flow Goer Score, send to a different thank you page URL", wouldnt that conflict with the first condition that was met?
Does it make sense?
So what I am looking for is a set of conditions that run in an order. So basically
If HC Score is max, thank you page = a.html
If CP Score is max, thank you page = b.html
If FG Score is max, thank you page = c.html
If DT Score is max, thank you page = d.html
In such a case if my scoreboard looks like this:
HC = 3
CP = 3
FG = 2
DT = 2
As you can see first condition is true i.e. HC is max value of all.
Because the first condition is true, it wont check other conditions. And so it does not matter if HC = CP
However, if I swap the order of condition 1 and 2, CP will be max value.
All of that will happen if jotform runs based on the order in which conditions are built. Is that true?
Thank you.
-
mert JotForm UI DeveloperReplied on March 23, 2016 at 9:02 AM
According to my tests, if you add two "greater than" rule without defining any condition for "equality" case, it does nothing when HC and CP is equal. To demonstrate this issue, I created a form with "Show/Hide a Field" conditions and the first setup will be looking like this:
Below, you can find the reaction to the "equality" case: (It does not hide anything)
So, the priority of those two "greater than" rule doesn't change anything. However, if I add one "Show/Hide a Field" condition for "equal to" case, I need at it to the lowest priority level, because when I add it on the first priority, it stops working and keeps the fields hidden even if the conditions are changed.
To sum up, you need to control the equality cases and those conditions needs to be on lowest priority levels than "greater than". Please, see the last setup from the below:
Also, you can check the demo form by yourself from the link below:
https://form.jotform.com/60823471041952
Please, initialize your conditions with this method. If you need anything else, don't hesitate to contact us.
Regards.
-
flowgenomeReplied on March 29, 2016 at 7:47 AM
Thanks for your response. It seems there are a couple of issues.
If you look at the only submission I have currently, the conditions are not working:
1. The Final Personality field is not updating according to the condition I have set up.
2. Its not redirecting to the thank you page according to the score even though thats what the conditions are set for.
Can you take a look and probably test yourself a couple of times to see what I mean.
Thank you.
-
mert JotForm UI DeveloperReplied on March 29, 2016 at 9:11 AM
Hi there,
When I checked the actual form, I can see that the formula from my example has some problems to calculate greater value among them, you are right. Let me take a look at it for a little while, I will come back with the answer as soon as possible.
Thank you for your patience.
-
flowgenomeReplied on March 31, 2016 at 2:46 AM
Hi Mert
Did you happen to take a look at this? Is this something that can be done via jotform?
Thank you
-
mert JotForm UI DeveloperReplied on March 31, 2016 at 4:19 AM
Hi there,
Sorry for the latency, I have done more tests on your form and decided that our logic is only working on "Show/Hide a Field" condition. So, I changed the approach on your form and set the "Greater than" rules for "Show/Hide a Field". Moreover, you have already set hidden "Text box" fields for 4 personalities and I just add this one to demonstrate.
Please, see it from the below:
As it is seen, when the "Hard Changer Score" is greater than others, it shows the "Hard Changer" field, so the final personality will be decided. You can give all of those four "Text box" fields' names "Final Personality", so when one of them is triggered, user understand that the final decision is just like the field that appear at the end.
I hope this one will work for you. Please, let us know about the results.
Regards.
-
flowgenomeReplied on April 5, 2016 at 8:30 AM
Hi Mert
We do not want to "Show" the final personality to a user on the form.
We want to send that information in an email, so they can check the emails and we make sure that they are receiving the email.
That being said - did you look at the test data? It is populating the various scores but
1. The field value is not getting copied into "Final Personality" field, and
2. The thank you page is not redirecting according to the highest score.
Please help and let me know if this is unachievable in jotform so we can look for other services.
Thank you for all your cooperation.
-
mert JotForm UI DeveloperReplied on April 5, 2016 at 10:14 AM
Hi again,
I think I found the correct combination this time; but before we start, please disable or delete the previous created conditions. To start with, we need to create two "Form Calculation" widget (in my example, they are "temp1widget", "temp2widget") to get sub-result. In general, I separate the four options in two groups and then, compare them to get the final value.
For "temp1widget", you need to create the following conditions:
For "temp2widget",
Then, we compare them between each other to give the final value to "Final Personality":
On my tests, this setup is working, you can also test it on the example form from the below:
https://form.jotform.com/60954023233953
Please, do let us know the results.
Regards.
-
flowgenomeReplied on April 6, 2016 at 4:36 AM
Hi Mert
I appreciate you working out this problem.
But this doesnt completely take care of the issue because Final Personality has to be a text field based on which I want to show the relevant thank you page.
In your set up the Final personality is getting populated by a score which I cannot use to show the thank you page.
I think we are almost there maybe some small thing needs to be added somewhere.
Thanks and look forward to your response.
-
BorisReplied on April 6, 2016 at 6:17 AM
So you want to perform the calculations, but also have the end result displayed as text. This is getting a little bit complex in that we will have to add a few more fields and conditions, but it is achievable by simply building upon what we have so far.
First, I have added two additional Text Box fields to the form, which will hold the temporary result. One if for HC or CP, and the other for FG or DT:
Then, I've duplicated the conditions that are used for the temp1 and temp2 widgets. I've changed the duplicated conditions to output text, such as "Hard Changer", into the temporary Text Box field we created.
So in essence, we have temp1 and temp2 widgets that are used for calculating the winning personality, and we have two Text Box fields where we output the "text" or "name" of the winning personality - based on duplicated conditions from temp1 and temp2 widgets.
Here is an example condition for "temp - HC or CP" field, which corresponds to a similar condition of temp1 widget:
We have 3 conditions for the first temporary Text Box field, and 3 for the second one - we have 6 new conditions on the form.
Third thing we need to do, is then change the final conditions that populate the "Final Personality" field. We will simply change them to populate from our Text Box fields, rather then from temp1 and temp2 widgets:
Here is a demo form:
https://form.jotform.com/60962454775971
You can then set up your conditional Thank You message based on what is in Final Personality field, and you can also clone the above demo form into your account by following this guide:
https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL
Please let us know how it goes, or if you need any further assistance. Thank you.
-
flowgenomeReplied on April 7, 2016 at 8:07 AM
Hi Mert
Thanks. This seems to work but still one little problem after I have added conditions for thank you page.
This is my form:
https://form.jotform.me/60973718960467
The Final Personality turns to 0 as soon as I hit the "Submit" button and I think because of that it shows the default thank you page. Can you please let me know how to avoid this.
Once this is fixed, we will be done and I will be extremely happy and grateful to you.
Thanks.
Anton
-
mert JotForm UI DeveloperReplied on April 7, 2016 at 9:35 AM
Hi Anton,
First of all, the last modification has made by my colleague Boris, so we can thank you to him. If we come to our subject, I didn't encounter the same issue with you. When I hit the "Submit" button, the value of the "Final Personality" is not changed. We can understand it from the email submission.
As it is seen from the below, the value from the form hasn't changed:
I assume that you are not asking the number value of it, because we discussed it and cancelled it on the previous steps. In addition, I can able to monitor the redirected "Thank You" page. If I understand the issue wrongly, please correct it on your next post.
Thank you.
-
flowgenomeReplied on April 9, 2016 at 5:14 AM
Hi Mert
Check this when I submit my form
Before hitting the submit button the final personality shows the correct value but as soon as I hit the submit button it becomes 0 and I get a blank thank you page. I added 4 conditions to display a different thank you page for each personality type.
Is it possible for you to add 4 different thank you pages (URLs) for every possible value of final personality in your form and share the link with me please. That way I can import the form. You can use any 4 URLs like google.com, bing.com, yahoo.com and cnn.com
Thanks
Anton
PS - Thanks to Boris too ;)
-
Chriistian Jotform SupportReplied on April 9, 2016 at 7:39 AM
Hi Anton,
Yes, it is possible to add different thank you page condition in your form. I did a test submission in your form but I was not able to encounter the issue. I was redirected to this page when I submitted the form.
Let me investigate the issue further. I will get back to you once I get a result.
-
Chriistian Jotform SupportReplied on April 9, 2016 at 8:08 AM
As per further investigation, I noticed that one of the conditions on the form is not working properly.
I noticed that when you load the page, based on that condition, the Final Personality field value should be equal to temp - HC or CP field but upon load the value is set to 0.
I think I fixed the condition in my cloned form. Can you check this cloned form - https://form.jotform.com/60992738540969 on your end?
-
flowgenomeReplied on April 12, 2016 at 9:54 AM
Hi Christian
Thank you. It worked finally and I am convinced that we can create any kinds of surveys in Jotform. However, I would have loved to find a really easy/simple way to do this. We have set up over 40 conditions to make this happen. If we had a widget that could just calculate the most common personality based on the type of responses it would be great. We created the same survey in SnapApp and it was a snap really.
But thanks for all your cooperation.
Thank you.
Anton
-
mert JotForm UI DeveloperReplied on April 12, 2016 at 11:06 AM
Hi Anton,
On behalf of my colleague, you are most welcome. It has been a long and tiring marathon to get the result we want; but we did it at the end. Your feedback is worthwhile to us, we will consider it seriously.
Best regards.