Support » Plugin: Calculated Fields Form » Hide Test Results While Completing Survey

  • Resolved memelb

    (@memelb)


    Hi, I’m implementing this psychological test which has 3 outcomes depending on user’s selection of answers from total of 12 questions.

    1) Score 0-19 2) Score 20-34 3) Score 35 above.

    I’ve set the equation to fieldname9+fieldname10+fieldname11+fieldname12+fieldname13+fieldname14+fieldname15+fieldname16+fieldname17+fieldname18+fieldname19+fieldname2

    In Define Dependencies I’ve
    If value is value<=19 If rule is valid show: fieldname20
    If value is value>=20 AND value<=34 If rule is valid show: fieldname8
    If value is value>=35 If rule is valid show: fieldname7

    The problem

    Now the form does the calculations right but fieldname20 and fieldname8 are always displayed while the fieldname7 is displayed if the value goes above 35.

    I want nothing to be displayed until either the last question is clicked or by pressing a button all results should display.

    Please assist. (i’m using the free version)

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @memelb

    The issue is caused by the dependencies.

    – For the first dependency rule, click on the link: “Edit rule manually”, and enter the following piece of code as the validation rule:

    
    0<value && value<=19
    

    – In a similar way, merge the rules 2 and 3. Instead to create two separated rules, remove the third dependency rule, and click on the “Edit rule manually” link of second rule, and enter the following dependency rule:

    
    19<value && value<=34
    

    – The last dependency rule does not require modifications.

    and that’s all.
    Best regards.

    Thread Starter memelb

    (@memelb)

    That worked like charm !

    Thanks, for my knowledge and reference for future similar quizzes – Why we put &&?

    Plugin Author codepeople

    (@codepeople)

    Hello @memelb

    Because in javascript the “And” operator is represented by the double symbol: &&

    In a similar way, the “OR” operator is represented as ||

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide Test Results While Completing Survey’ is closed to new replies.