Date Field: How to validate that return date is later than departure date?

  • Profile Image
    Douglas Hopkins
    Asked on March 08, 2016 at 01:17 PM

    This just came in ..with return date after departure date ...is there any logic built in so it tells the client it is wrong?

     

     

     

     

     

     

     

    Question

    Answer

     

    Return

    Departure Airport

    LHR: Heathrow Airport, London, England, United Kingdom

    Destination Airport

    IBZ: Ibiza, Balearic Islands, Spain

    Departing On

    06/06/2016

    Returning On

    20/03/2016

    Aircraft Type

    Any Type

    Passengers

    8

    Lead Passenger Country

    Lebanon

    Phone Number

    (+44) 7445454444

    Full Name

    Steph Nader

    E-mail

    steph.nader@gmail.com

    Email Validator

    steph.nader@gmail.com

     

     

     

     

  • Profile Image
    Kevin_G
    Answered on March 08, 2016 at 03:48 PM

    Yes, you  may use calculations to achieve it, please follow the steps as below. 

    First, add the Form Calculation widget to your form. 

    Once the widget is added, add a calculation as shown on the image below.

    Now, add a text to indicate your user that the return date is not correct. 

    The last step is to add a condition, it will show the error message and will hide the submit button if the return date is earlier than the departure date. 

    Here is my sample form: https://form.jotform.com/53097140976967

    Feel free to clone it

  • Profile Image
    DouglasHopkins
    Answered on March 08, 2016 at 05:45 PM
    Hi Kevin
    I have tried just can not make it happen.Its really frustrating as I have no IT guys and I am making things worse.
    Warmest Regards

    Douglas Hopkins
    CEO

    WINGS
    Bruckless Donegal Ireland F94A4A0
    p: +353749737684 m: +353877649051
    w: www.wingscharter.net  e: ops@wingscharter.net  



    ...
  • Profile Image
    Kevin_G
    Answered on March 08, 2016 at 07:01 PM

    I have checked your form and the condition that you have added, seems like you deleted the fields. Could you please tell us the step where you need help? 

    Is it with the calculation widget? 

    Do let us know, we will be glad to assist you. 

  • Profile Image
    DouglasHopkins
    Answered on March 09, 2016 at 02:45 AM
    Yes Kevin
    Iadded the calculation wizard followed the steps as per your instructions,added text and conditions.
    I did not have same results.So I deleted all,I also thought I deleted conditions.
    Is there any way you can just add all that stuff to my form?
    I need to make sure I am not confirming dates with clients that should not even be produced.
    Warmest Regards

    Douglas Hopkins
    CEO

    WINGS
    Bruckless Donegal Ireland F94A4A0
    p: +353749737684 m: +353877649051
    w: www.wingscharter.net  e: ops@wingscharter.net  



    ...
  • Profile Image
    Mike_G
    Answered on March 09, 2016 at 04:14 AM

    I'll inspect your form and try to check what I can do. I'll let you know via this thread once it is done. Thank you. 

  • Profile Image
    Mike_G
    Answered on March 09, 2016 at 04:36 AM

    Please check your form now. I have made the changes to it as you have requested. However, instead of hiding the "Submit" button, like what my colleague, Kevin_G, have instructed, it will just hide the "Next" button. So if the "Returning On" date field is earlier than the "Departing On" date field, the "error message" will appear and the "Next" button will be hidden and the one filling up the form will not be able to go to the next page to make submissions unless he corrected the error.

  • Profile Image
    DouglasHopkins
    Answered on March 09, 2016 at 04:45 AM
    Thank you Mike
    ...
  • Profile Image
    DouglasHopkins
    Answered on March 09, 2016 at 04:45 AM
    Thank so very much ,support is exceptional!!!
    ...