Is there a way to conditionally show an error based on the answers provided by the user?

  • tylerport
    Asked on February 13, 2018 at 5:07 PM

    I am building a form that looks at the answers to a handful of questions and then provides the "answer product" based on the answers. The problem I am facing is if someone chooses a combination of answers that I have not defined a product for. Is there a solution for this? Like a notification or an error message that could be displayed? The form in question is https://form.jotform.com/80436468944164

  • Support_Management Jotform Support
    Replied on February 13, 2018 at 6:59 PM

    If you will handle the possible "answer products" conditionally, then you can use the TEXT FIELD to show a visual cue (with a warning/error message) to your respondents for the combination of answers that you haven't defined a product for.

    The conditions will basically handle this for you automatically for as long as you have corresponding SHOW condition. For example:

    IF condition A is met THEN SHOW answer product A AND HIDE the text field error

    IF condition B is met THEN SHOW answer product B AND HIDE the text field error

    NOTE: The key feature here is to utilize the AND option, where you're chaining/combining 2 or more DO actions within a single condition. You can add multiple IF statements or DO actions by clicking the Is there a way to conditionally show an error based on the answers provided by the user? Image 1 Screenshot 20 icon on the right when setting up your conditions.

    Just by using the 2 examples above, it would mean that if the respondent never fulfilled/met the conditions for A and B, then he/she will automatically see the TEXT FIELD warning/error message you have setup.

    Related guides:

    How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    Hide-or-Show-Multiple-Fields-at-Once

  • tylerport
    Replied on February 14, 2018 at 11:52 AM

    Please refer to my actual form. You will see the conditions are already in place for the many products. https://form.jotform.com/80436468944164 

    I need to add an error message in for the event that the selected combination of answers does NOT result in a product. 

  • Marvih
    Replied on February 14, 2018 at 1:17 PM

    You can add another Text field that will act as the "Error Message" then add an additional DO condition and the Hide field.

    For example I added a Text entry and wrote it as "No combination found". It will look like this on your Show/Hide field conditions.

    Is there a way to conditionally show an error based on the answers provided by the user? Image 10

    The condition above by default will show the "Error/No combination found" if there is no correct combination.