Conditional Logic: How to Hide Form Fields or Disable Submission for Unavailable Dates

  • Kyra's Kreations
    Asked on May 23, 2024 at 2:18 PM

    Hello,

    How can I add a condition that if the date user selects is unavailable, to hide the rest of the form, or not be able to submit the form. I'm finding that end users can override the non-available date by typing it in, and still submit forms for dates that are defined as not available.

  • Jemuel JotForm Support
    Replied on May 23, 2024 at 3:00 PM

    Hi Kyra's Kreations,

    Thanks for reaching out to Jotform Support. If the user overrides the date and selects a non-available date by typing it in, they will not be able to submit the form. An error message will indicate that the typed-in date is unavailable, and it will prevent them from submitting the form. You can check out my screencast for the result: Conditional Logic: How to Hide Form Fields or Disable Submission for Unavailable Dates Image 1 Screenshot 60

    In my example, I've set the available dates to May 23 and 24, 2024. When I manually typed May 25, 2024, it did not allow me to submit the form due to an error message.

    However, if you still wish to hide the form field or the submit button once a user has selected an unavailable date, it is still possible. Let me show you how:

    1. In Form Builder, click on Settings at the top.
    2. Click on Conditions on the left, and click on Add condition. Conditional Logic: How to Hide Form Fields or Disable Submission for Unavailable Dates Image 2 Screenshot 71
    3. Select Show/Hide Field. Conditional Logic: How to Hide Form Fields or Disable Submission for Unavailable Dates Image 3 Screenshot 82
    4. Now, set up the conditions. You can copy my conditions as shown below.
    5. Lastly, click on Save. Conditional Logic: How to Hide Form Fields or Disable Submission for Unavailable Dates Image 4 Screenshot 93

    Here's my result: Conditional Logic: How to Hide Form Fields or Disable Submission for Unavailable Dates Image 5 Screenshot 104

    Here's my demo form. You can clone it to test or inspect.

    Give it a try, and let us know if you need more help.