How to prevent user to enter a time

  • Profile Image
    Beanie3556
    Asked on March 14, 2017 at 04:30 AM

    Dear Forum,

    I have created a form where the user is supposed to enter a start time in one field and a end time in another field.

    Then some hidden fields (form calculation widget) will perform a calculation and return hours and minutes in the last field.

    How do I use field validation to prevent a user to enter a "End Time" that is earlier than the entered "Start Time" - and how do I make sure that the user enters a "start time" that is not after the "End Time"?

    Please see the form in below link.

    https://form.jotform.me/70722116456452

    Any information or help that can contribute to solve this problem, is highly appreciated.

    Thank you very much in advance for your great support.

    Best Regards,

    Bjorn

  • Profile Image
    Chriistian
    Answered on March 14, 2017 at 05:18 AM

    I'm currently checking your requirements. Please allow me some time to further investigate. I'll get back once I've found results.

    Regards.

  • Profile Image
    Chriistian
    Answered on March 14, 2017 at 05:25 AM

    You can add a condition to your form that will hide the submit button if the two following conditions are met:

    1. End Time is earlier than the Start Time

    2. Start Time is after End Time

     

     

    Let us know if you need further assistance.
    Regards.

  • Profile Image
    Beanie3556
    Answered on March 15, 2017 at 02:52 AM

    Hi Christian,

    Thank you very much for your reply. Yes, it worked for me.

    Thank you once again for your great support.

     

    Best Regards,

    Bjorn