What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Conditions for start and end dates

    Asked by nalusurfcamp on January 17, 2017 at 01:11 AM

    Hello,

    I have a form with two date fields "start" and "end" dates for a hotel booking form. I need to make sure that start date is always before the end date and that end date is always after the start date. If the statement is false, I need to either set the field empty so that user has to enter a new and correct date or auto calculate the field for the user. Which ever is the easiest to implement.

    I tried playing with the conditions settings but I cannot seem to figure it out. Do you have any ideas?

    Page URL:
    https://form.jotform.me/70155324964457

  • Profile Image
    JotForm Support

    Answered by Helen on January 17, 2017 at 04:08 AM

    Hi,

    Thank you for contacting us.

    You can not make empty field after the worked condition with our conditional logics. However, you can set a condition like if the user enters the fields wrong the submit button will hide and message that you are wrong will be shown.

    Just follow these steps:

    1. Add a Text field into your form at Basic Fields. Then, write your message.

    2. You must "Hide" this message default. Click properties icon and select "Hide Field".

    3. Select "Conditions" at the top of the page.

    4. Select "Show/Hide Field"

    5. Set the condition properties like this:

    Here is a result:

    Here is my Demo Form, you can clone it to your side: https://form.jotform.com/70161855059963

    Please let us know if you need any questions or issue.