How to prevent users to submit form if return date is before departure date

  • Profile Image
    Catteralls
    Asked on August 10, 2015 at 03:09 PM

    Hi, if i have 2 fields ('Departure Date' and Return Date), is there a way of limiting it so that only dates on the same date or after can be selected in Return Dates? So you'd effectively be setting a disable dates before 'Departure Date'?



    This is a re-post of a comment on How to Use the Date Limits Option

  • Profile Image
    BJoanna
    Answered on August 10, 2015 at 04:37 PM

    You can use "Limit Dates" feature to disable past days. However you can not prevent users to choose Return date that is before Departure date.

    Possible workaround is to add  Form calculation field that will calculate difference between dates and then if calculation is 0 or less you can use conditional logic to hide submit button so your users will not be able to submit your form if return date is before departure date.

    http://www.jotform.com/help/259-How-to-perform-calculation-in-the-form 

     

    Here is my demo form: http://form.jotformpro.com/form/52216217875962? 

    Hope this will help. Let us know if you need further assistance. 

  • Profile Image
    Catteralls
    Answered on August 11, 2015 at 07:51 AM

    Hi, that works well! Thanks

  • Profile Image
    EltonCris
    Answered on August 11, 2015 at 10:53 AM

    @Catteralls 

    Glad to hear it. Cheers!