How to limit form submissions to specific time frame?

  • JPR1963
    Asked on August 3, 2015 at 6:07 AM

    Can I restrict the hours in the form? For my restaurant I would like to give the possibility to make prenotations only from 11-23 hours.

  • Ben
    Replied on August 3, 2015 at 12:28 PM

    I would just like to confirm if I have understood you correctly.

    You would like to limit the submission to be only possible to be made when time is between 11AM (11) and 11 PM (23).

    If that is true, than this is very simple to do with the use of conditions.

    All that you need to do is to add the Time field from Quick Tools menu to your form and set the default time to be current time.

    How to limit form submissions to specific time frame? Image 1 Screenshot 40

    Once you do, just go into conditions and set them up like so:

    How to limit form submissions to specific time frame? Image 2 Screenshot 51

    The setup is always in 24 hour format no matte what format you opt for in the toolbar for.

    Now, all you need to do is to hide the time field, so that it is picked up by the conditions, but so that users do not see it and we do that by clicking on the field with our right mouse button and by selecting Hide Field

    How to limit form submissions to specific time frame? Image 3 Screenshot 62

    You can see how it works together here: http://form.jotformpro.com/form/52145082409956

    It will activate the conditions based on the current time, so I have left the fields as non hidden for you to be able to change the time and test it out.

    If you wish, you can simply clone the form to your account following the steps here: How to Clone an Existing Form from a URL

  • JPR1963
    Replied on August 4, 2015 at 2:36 AM

    Hi Ben

    Thank you for the answer. I understand, that my english is not the best... ;-) It's not what I'm looking for. I wanted to restrict the hours in the pop up of the the time. Now the pop up shows the time to choose from 0-24 hour. (Screenshot attached) I would like to restrict this to 11-23. Is this possible?

    Thank you for your support.

    jp

    How to limit form submissions to specific time frame? Image 1 Screenshot 20

  • Elton Support Team Lead
    Replied on August 4, 2015 at 8:12 AM

    Thanks for your clarification @JP. I see what you mean but unfortunately it is not possible to edit the time values on the time field. You can however achieve this when you use your form source code and remove these options on the source.

    Example:

    How to limit form submissions to specific time frame? Image 1 Screenshot 40

    Another workaround is to use two dropdown fields and shrink them. Then define the values on each of the dropdown fields.

    Example:

     

    How to limit form submissions to specific time frame? Image 2 Screenshot 51

    How to limit form submissions to specific time frame? Image 3 Screenshot 62

    If you want to proceed with using the two dropdown solution, this requires custom CSS codes to tighten the two fields and to remove the field label on the second dropdown. If you need help with this, feel free to let us know here so we can assist you further.

    Regards!

  • berilokten
    Replied on August 4, 2015 at 8:25 AM

    One solution would be copy the full source code directly to your website, and then remove those options  from the drop down.

    Here is how to do it.

    1) Click on "Time Format" and choose "24 Hour option"

    How to limit form submissions to specific time frame? Image 1 Screenshot 70

     

    2) Click on "Setup & Embed".

    How to limit form submissions to specific time frame? Image 2 Screenshot 81

     

    3) Click on "Embed Form"

    How to limit form submissions to specific time frame? Image 3 Screenshot 92

     

    4) Choose "Source"and click on it.

    How to limit form submissions to specific time frame? Image 4 Screenshot 103

     

    5) Copy the code from "Source Code" and paste the code to any text document.

     How to limit form submissions to specific time frame? Image 5 Screenshot 114

     

    6) Delete these rows from the code.

    How to limit form submissions to specific time frame? Image 6 Screenshot 125

     

    7) Save it on your website.

     

     

  • JPR1963
    Replied on August 4, 2015 at 10:44 AM

    GREAT! The embed solution works great, thank you very much for your help!

    Now I have only to deal with the padding above the form. It should be zero... I tried with .form-all {

        padding-top: 0;

    } 

    but there is still some space above the form. Arghhh...

     

  • Ben
    Replied on August 4, 2015 at 11:51 AM

    I am glad to hear that the source code option worked for you :)

    Now in regards to your other issue. Since we can only have one issue / question per thread I have moved this to a new thread where we will help you achieve what you are after. The new thread can be found here: http://www.jotform.com/answers/628202