Is it possible to show an error message based on conditions?

  • Profile Image
    tamrynstorm
    Asked on May 26, 2020 at 01:37 PM

    Hi there! 

    I would like to add an error message to my form when a user selects contradicting multiple choice options. For example, there is always an option to select "none". I would like an error message to pop up when a user selects "none" AND another multiple choice option. Right now, if the user selects "none" and another option, the form shows a blank page. I assume this is because the selections have canceled out all the remaining questions? 

    Thank you!

  • Profile Image
    Mike
    Answered on May 26, 2020 at 03:33 PM

    You may add an error message using a Paragraph element:

    Then use a Show Field condition, for example:

    Note that when you use the Show Field condition, the corresponding Hide Field condition is not needed.

    The issue with the blank page could be related to some conflicts in the Hide Field conditions.

  • Profile Image
    tamrynstorm
    Answered on June 15, 2020 at 06:31 PM

    Hi there, 

    I have been unable to get this to work. It will only show a blank page when "none" and one of the other conditions are selected. This may be because I have it up so that if only "none" is selected the form should skip to a particular page? How can I set the form up so that two or three particular options are not selected together? 

    Thank you!

  • Profile Image
    Mike
    Answered on June 15, 2020 at 08:05 PM

    You are right it appears to be related to the conflict with the skip to page condition. I am afraid it will not work together in card layout forms.

    You may consider using a classic form layout. In classic forms, you can place multiple elements on the same page, so you can use a show field condition to show the text message, and also use the skip to page condition.

  • Profile Image
    tamrynstorm
    Answered on June 16, 2020 at 01:16 PM

    Thank you. Thats disappointing. Can I switch to the other format without starting from scratch or losing the order of my cards? 

  • Profile Image
    Mike
    Answered on June 16, 2020 at 03:07 PM

    Yes, you can clone the form:

    How to Clone an Existing Form from Your Account

    And then change the layout of the cloned form:

    How to Change Form Layout

    In the classic layout, the Page Breaks are added manually.

  • Profile Image
    tamrynstorm
    Answered on June 27, 2020 at 08:37 PM

    Thank you for this option. Unfortunately the form will work best using the card layout form. If I were to publish the form and a user were to pick two conflicting options by mistake, would Jotform give them any options to go back and change their answer or could they press their "back" button to try again? Right now when I demo the form, there is just a blank page with a button to save. Is that how it would be once the form is published? 

  • Profile Image
    Sonnyfer
    Answered on June 27, 2020 at 11:49 PM

    If you wish to continue using Card Forms, then, unfortunately, yes, it's going to have a blank page with a SAVE button at the bottom. They can, however, refresh the page to try again.

    Kindly note, however, that we do not recommend it as it will cause confusion to your users.