How to block 'today' and past dates through conditional logics

  • Profile Image
    magicianking
    Asked 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?

  • Profile Image
    EltonCris
    Answered 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
    magicianking
    Answered 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
    jeanettebmz
    Answered 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
    jeanettebmz
    Answered 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