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

    How to prevent user to enter a time

    Asked by Beanie3556 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

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

  • Profile Image
    JotForm Support

    Answered by Chriistian 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
    JotForm Support

    Answered by Chriistian 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

    Answered by Beanie3556 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