Calculation: How to calculate repetition of character, selected by user

  • DigitalYMC
    Asked on June 10, 2024 at 8:07 AM

    Hi,

    https://form.jotform.com/241565124819055

    We are building like an assessment or quiz form. The result will be based depending to the user's answer using single choice. I put calculation widget, calculation condition and hidden fields.


    I attached the Scoring keys.

    Jotform Thread 15755081 Screenshot
  • Joseph Christian JotForm Support
    Replied on June 10, 2024 at 9:54 AM

    Hi DigitalYMC,

    Thanks for reaching out to Jotform Support. Can you explain a bit more about your scoring key and how you'd like the quiz results to be calculated? Also, how many points is each category equivalent to?

    Once we hear back from you, we'll be able to move forward with a solution.

  • DigitalYMC
    Replied on June 10, 2024 at 10:21 AM

    Thank you for your response. Actually there is no score, the result will be depending on the majority of their answers. For example, this is the answer of the user 1c, 6a, 7c, 8c, 10a, 11b, 12a, 15d, 17a, 20c 
    his assessment result will be Innovation & Creativity.

  • Eldrex JotForm Support
    Replied on June 10, 2024 at 10:47 AM

    Hello DigitalYMC,

    I understand what you’d like to do, but I’ll need a bit of time to work if it is possible using calculation widget and assigning calculation values. I’ll get back to you shortly.

  • DigitalYMC
    Replied on June 12, 2024 at 9:03 AM

    Hello,

    I would like to update the status of this ticket?


    Thank you.

  • Kris Ann JotForm Support
    Replied on June 12, 2024 at 9:21 AM

    Hi DigitalYMC,

    I have reached out to my colleague Eldrex, and he is still working on it. He will get back to you as soon as he can.

    Thanks for your patience and understanding, we appreciate it.

  • Eldrex JotForm Support
    Replied on June 12, 2024 at 5:48 PM

    Hello DigitalYMC,

    We really appreciate your patience and understanding while we look into this. Unfortunately, the workaround that I have tested only applies to the total number of answers and not in a set-up that you have showed. However, you can still calculate the answers based on the highest among the options. For example, in 20 questions, the form user has answered a total of 20 letter A's then you can set it to show that he is in Innovation & Creativity.

    If this meets what you are looking for then I can show you how to do it in detail.

    As soon as we hear back from you, we can move forward with a solution.

  • DigitalYMC
    Replied on June 13, 2024 at 7:50 AM

    Thanks Eldrex! I'll get back to you regarding this ticket.

  • DigitalYMC
    Replied on June 20, 2024 at 11:44 AM

    Hi Eldrex,

    "For example, in 20 questions, the form user has answered a total of 20 letter A's then you can set it to show that he is in Innovation & Creativity."

    Can you show me how to do your solution?


    Follow-up question, how about when the user just answer a total of 15 A's?

  • Ibrar JotForm Support
    Replied on June 20, 2024 at 11:56 AM

    Hi DigitalYMC,

    I understand the issue, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

    We really appreciate your patience and understanding while we’re looking into this.

  • Ibrar JotForm Support
    Replied on June 20, 2024 at 1:51 PM

    Hi DigitalYMC,

    While the feature you’re looking for isn’t currently available, rest assured we’re always working to add new services and features to Jotform. I've gone ahead and escalated your request to our Developers. When or if it's implemented depends on their workload, how viable it is, and how many other users request it. As a workaround, we can add short fields and increase value of whatever option selected by user & at the end we can calculate all of individual answers and based on condition we can find the greater value and show phrase/scoring keys to user. Let me walk you through it, step by step:

    Adding 4 fields and update value of field based on Selected option

    1. In Form builder, click on the Add Form Element menu on the left side of the page.

    2. Under the Basic tab, scroll down the list and choose the Short text field.

    3. Now, just drag and drop it to your form, you will have to add 4 same fields against each question.

    4. Select Short text field & click on Gear icon.

    5. Under Advanced tab, toggle to shrink and hide field.

    Calculation: How to calculate repetition of character, selected by user Image 1 Screenshot 160

    6. Copy field and paste it 3 more times, rename for different options.

    Calculation: How to calculate repetition of character, selected by user Image 2 Screenshot 171

    7. While In Form builder, select Settings at the top.

    8. In the menu that opens on the left side of the page, click on Conditions.

    9. Click on + Add condition and choose Update/Calculate field.

    Calculation: How to calculate repetition of character, selected by user Image 3 Screenshot 182

    10. Set Condition as below picture:

    • If the selected answer is A:

    Calculation: How to calculate repetition of character, selected by user Image 4 Screenshot 193

    • If the selected answer is B:

    Calculation: How to calculate repetition of character, selected by user Image 5 Screenshot 204

    • If the selected answer is C:

    Calculation: How to calculate repetition of character, selected by user Image 6 Screenshot 215

    • If the selected answer is D:

    Calculation: How to calculate repetition of character, selected by user Image 7 Screenshot 226

    Add calculation widget to calculate repetition of each answer

    1. In Form Builder, click on the Add Form Element menu on the left side of the page.

    2. Under the Widgets tab, enter Form Calculation in the search bar, and drag and drop the widget to your form.

    3. Select Form Calculation widget and click on Gear icon.

    4. Under Advanced tab, toggle to hide the widget.

    Calculation: How to calculate repetition of character, selected by user Image 8 Screenshot 237

    5. Select Form Calculation widget and click on Wand icon.

    6. Click on + Add Field and choose all A answer's fields.

    Calculation: How to calculate repetition of character, selected by user Image 9 Screenshot 248

    7. Repeat Step 1-6 for B, C & D options.

    Adding Headings to show Scoring Key.

    1. In Form builder, click on the Add Form Element menu on the left side of the page.

    2. Under the Basic tab, scroll down the list and choose the Heading field.

    3. Now, just drag and drop it to your form

    4. Select the heading field and click on Gear icon.

    5. Under General tab, toggle to hide field.

    Calculation: How to calculate repetition of character, selected by user Image 10 Screenshot 259

    Configuring Condition to Show Scoring Key

    1. In Form builder, select Settings at the top.

    2. In the menu that opens on the left side of the page, click on Conditions.

    3. Click on + Add condition and choose Show/Hide Field.

    Calculation: How to calculate repetition of character, selected by user Image 11 Screenshot 2610

    4. Set condition as below picture:

    • If A is repeated most.

    Calculation: How to calculate repetition of character, selected by user Image 12 Screenshot 2711

    • If B is repeated most.

    Calculation: How to calculate repetition of character, selected by user Image 13 Screenshot 2812

    • If C is repeated most.

    Calculation: How to calculate repetition of character, selected by user Image 14 Screenshot 2913

    • If D is repeated most.

    Calculation: How to calculate repetition of character, selected by user Image 15 Screenshot 3014

    You can check out the demo form. If you want to clone the demo form, you can easily do that. This Guide will show you how to do that. We also have a guide about How to Insert Text or Calculation Into a Field Conditionally that you can check out. We also have a guide to help you learn How to Show or Hide Fields Conditionally.

    Give it a try and let us know if you have any other questions.

 
Your Answer