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 block 'today' and past dates through conditional logics

    Asked by magicianking on July 14, 2013 at 11:49 PM

    For my form, Restaurant Reservations, I want to block not only past date but the current date too.  How do I do that?

    block block today dates block past dates
  • Profile Image
    JotForm Support

    Answered by EltonCris on July 15, 2013 at 03:42 AM

    Hi,

    Unfortunately we only have "disable past dates" option on the calendar fields excluding the current date. However, you are free to download your form source code and add extra scripts that blocks current date on the calendar field. How to get your Form Source Code

    Thanks!

  • Profile Image

    Answered by magicianking on July 19, 2013 at 07:49 AM

    My problem is that I don't have the slightest idea about scripts.  The code looks amazingly daunting to me.

     

    What code would I add?  Where would I add it?

  • Profile Image

    Answered by jeanettebmz on July 19, 2013 at 12:44 PM

    It is possible to block the current date and past dates through conditional logics

    Please see how this form example works

    Basically what I did was to add a Free Text HTML field with a message "Current and past dates are not allowed"

     

    Then you establish a conditional logic, 

    With 2 rules:  When someone chooses 'today'  or  when someone   'today - 364'  (today minus 364)

    Then add 2 actions if ANY those criteria matches:

    Hide  the Submit button and Show the message that was set into the HTML field

    Otherwise, the form should submit

  • Profile Image

    Answered by jeanettebmz on July 19, 2013 at 01:15 PM

    I forgot to provide you instructions on regards to conditional logics

    Please follow this screenshot to open the Conditional wizard

     

    Once you opened, choose SHOW/HIDE A FORM FIELD  option