Have a summary of possible recommendations based on answers.

  • Profile Image
    cabrinirx
    Asked on March 29, 2019 at 02:24 PM

    Hello, I'm trying to create a form where, based on the questionnaire, the form would display a list of possible recommendations.

    For example: You have products A, B, C, & D. Throughout the questionnaire, answers may eliminate a product for the recommendation. At the end, the form would show that you're eligible to get A and/or B and/or C and/or D. To complicate this further, product A would have sub-products Z, Y, X, & W and I'd like to show specific results using similar logic.

    I can't quite figure out an element capable of doing so using conditional logic. Can you think of anything I can do?

  • Profile Image
    Nik_C
    Answered on March 29, 2019 at 04:24 PM

    That would only be possible with conditional logic, but in order to do so you have to define the logic on how the products should show.

    For example, what are the criteria for showing those products?

    When they should show?

    Could you please share some example steps so we can have a better picture?


  • Profile Image
    cabrinirx
    Answered on March 29, 2019 at 04:46 PM

    OK, in my case, A, B, C, & D are different types of birth control. The questions in the form are medical history questions using the multiple-choice format to help decrease the overall number of questions needing to be answered. Those answers regarding medical history help rule out whether A, B, C, or D would be a good recommendation.

    Furthermore, type A is a birth control class that has different sub-types Z, Y, X, & W that can also be ruled out depending on the medical history answers.

    With my example, there's over 5000 possible variations of results. I am hoping to have just one element at the end of the form that would display the narrow individualized possibilities for the patient when they complete the form.

    I have a matrix-based algorithm I follow if I do this in person, but this is proving to be quite difficult when implementing an online form.

    Any ideas?

  • Profile Image
    jonathan
    Answered on March 29, 2019 at 06:11 PM

    Can you please confirm first if this is the form you are working this on.

    If it is, I think a better way to implement the matrix-algorithm is to use points-system using the Input Table field.

    Example this multiple choice question 

    1553896917zzz 2019-03-30 06.01.20.png


    put them in the Input Table field (matrix table) and assign points to the selected option. In the table there will be 2 column single choice answer -- Yes or No.

    Assign point No = 0 and Yes = 1

    You can create calculation conditions using the Input Table field

    How to Perform Form Calculation in the Matrix Field

    If you summarize all the points, create the table for the total range that will determine if it should be assigned to birth control A,B,C, & D

    Example if total point range is 0-10 = A, 11-20 = B, 21-30=C... so on.




  • Profile Image
    jonathan
    Answered on March 29, 2019 at 06:36 PM

    I also suggest perhaps to use Classic form layout. I am creating a demo form here https://form.jotform.com/90877334732969

    1553898968zzz 2019-03-30 06.35.05.png

    I will work on the table algorithm using conditions and calculations. I will post update here of my results.



  • Profile Image
    cabrinirx
    Answered on March 29, 2019 at 06:48 PM

    Yep, that's my form.

    I've considered a score tabulation for this. However, it seems that point totals would be fairly tricky to fully capture the range of possibilities since they're not mutually exclusive (a patient could have answers that make her eligible for A or B or C or D, or maybe A or C but not B and D, or any combination like that).

    With just A B C and D (and no eligibility) as possible products, there's 16 score ranges that need to be made. Expand A out to Z Y X and W and that figure explodes.

    Is there any possibility that either a matrix exists where possibilities could be eliminated, or conditional rules may tease this out?

  • Profile Image
    jonathan
    Answered on March 29, 2019 at 07:23 PM

    I was also looking at Visual Multi Select widget as it has the elimination option feature. But it has only up to 2 selection options. Could have been ideal if at least 4 options (i.e. for A, B, C,  D)

    With my example, there's over 5000 possible variations of results.

    This was the reason I was not inclined to use conditions. It will take massive hit on the performance of the form if it has too many script conditions. The form will be useless if it it will not even load properly on the browser for the users to use online.

    The most extreme option is to use the form full source code. You will need to apply your own custom programming using the form's source code. Make a separate program for the matrix-based algorithm.

    I am still looking for alternative options and create a demo form. I will post update here when available.

    Thank you.






  • Profile Image
    cabrinirx
    Answered on March 29, 2019 at 07:33 PM

    Hmm, interesting, I didn't even figure the effect on performance with something like this (my bad, I'm not a programmer). I may also be off in my 5000 figure, but it's still quite a bit of possibilities.

    I wonder if we can simply do the first set of combinations for a smaller initial number, and then do the second combination (if required, in this example if A is a possibility) separate from the initial calculation - it may preserve some speed of loading the form.

    Either way, please keep me posted on your quest!

  • Profile Image
    Kevin_G
    Answered on March 29, 2019 at 09:53 PM

    If you would need to use the conditional logic option you may try with only few options, for example, try setting this up for only 4 options as example, and then to show each sub-option. 

    You may refer to the following guide to show/hide elements: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer 

    If this still does not work you may need to use the source code as explained by my colleague and develop your own code to handle the elements as needed.