Conditions for start and end dates

  • nalusurfcamp
    Asked on January 17, 2017 at 1: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?

    1484633260Untitled Screenshot 10

  • Helen
    Replied on January 17, 2017 at 4: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.

    Conditions for start and end dates Image 1 Screenshot 70

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

    Conditions for start and end dates Image 2 Screenshot 81

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

    Conditions for start and end dates Image 3 Screenshot 92

    4. Select "Show/Hide Field"

    Conditions for start and end dates Image 4 Screenshot 103

    5. Set the condition properties like this:

    Conditions for start and end dates Image 5 Screenshot 114

    Here is a result:

    Conditions for start and end dates Image 6 Screenshot 125

    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.