How to assign calculation values to input fields to be used in the Form Calculation

  • jokerpoker
    Asked on October 21, 2016 at 11:22 AM

    Hi,

    I want to create a survey where the participant have to click some buttons and receive a text message which fits to / is based on his answers.

     

    I had a good breakfast yesterday morning

    Right False

    I had an substantial lunch yesterday afternoon

    Right False

    There was a huge buffet yesterday evening

    Right False

     

    I can say "right" is "1" and "false" is "0".

    If the final result is "1" (the text message should be "AB"),"2" (the text message should be "CD") or "3" (the text message should be "EF")

     

    or in other words:

    If the participant clicked „false“ once, the following message appears: „Not bad, but…“

    If the participant clicked „false“ twice, the following message appears: „Please pay attention…“

    If the participant clicke „right“ three time, the following message appears: „It seems, that…“

     

    As far as I understand Jotform can do this but can anybody show me how it works.

     

  • Support_Management Jotform Support
    Replied on October 21, 2016 at 12:42 PM

    Yes this is achievable by using Conditional Logic and the Form Calculation Widget.

    Here's a demo form I created that behaves exactly as how you described it: https://form.jotform.com/62945051127958

    I had a good breakfast yesterday morning

    ☐ Right ☐ False

    I had an substantial lunch yesterday afternoon

    ☐ Right ☐ False

    There was a huge buffet yesterday evening

    ☐ Right ☐ False

    I can say "right" is "1" and "false" is "0".

    If the participant clicked „false“ once, the following message appears: „Not bad, but…“

    If the participant clicked „false“ twice, the following message appears: „Please pay attention…“

    If the participant clicke „right“ three time, the following message appears: „It seems, that…“

    To achieve that, here are all the things I did:

    1. I Added 3 Radio buttons, 3 Text fields and the Form Calculation widget

    Related guide: How-to-Add-a-Widget-to-your-Form 

    2. Set the Radio Buttons' Calculation Values on the Surveying tab to 0 and 1 like so:

    How to assign calculation values to input fields to be used in the Form Calculation Image 1 Screenshot 40

    3. Now setup the Form Calculation widget to ADD the TOTAL of the 3 Radio Buttons:

    How to assign calculation values to input fields to be used in the Form Calculation Image 2 Screenshot 51

    Related guide: How-to-Perform-Calculation-in-the-Form 

    4. Lastly, setup your conditions to show the Text Fields based on the total:

    How to assign calculation values to input fields to be used in the Form Calculation Image 3 Screenshot 62

    Related guide: Smart-Forms-Using-Conditional-Logic 

    I would recommend you clone my demo form, here's how, so you can clearly see how it was setup. I would also urge you to click the guides I linked on this reply and take your time reading them.

  • jokerpoker
    Replied on October 26, 2016 at 3:58 AM

    Wow, that´s great. Thx much for your help.

    Is it possible to show the result (in my case the text message "It seems that.../Please pay attention.../Not bad, but...") only after ALL radio buttons were clicked? The result/text message should be a surprise but right now you see how every click can change the result/text message.

    And because I added another text message ("You don´t need me...) in case anybody click "right" three times you see this message right from the beginning (one option to avoid that would be to use other values, i.e. "right" = 1 and "false" = 2; if no radio button was clicked the result is "0" and you don´t see a message). But maybe there are more elegant ways to solve this.

    https://form.jotformeu.com/62992254295365

    How to assign calculation values to input fields to be used in the Form Calculation Image 1 Screenshot 20

     

  • omerorkun JotForm Data Scientist
    Replied on October 26, 2016 at 7:52 AM

    Hi,

    You can show these messages at your "Thank You" page, I mean after submitting, instead of showing them immediately. What is more, as you mentioned, you can not get reliable data when the submitters are able to see how their changes affect the messages that appear. 

    We can set up conditions to show different "Thank You" pages. Here is how:

    We should use the "Change 'Thank You' Page" condition in order to do this. Please check my form here with your updated information:

    https://form.jotform.com/62993192055967

    And see my conditions here:

    How to assign calculation values to input fields to be used in the Form Calculation Image 1 Screenshot 20

    Please try this and see if it is working well for you. 

    Do contact us whenever you need assistance. We will be glad to be helping you.