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.
Is It Possible to Restrict What Times Can Be Selected in a Time Field Depending on the Day Selected in a Date Field?Asked by JOJI ABRAHAM on August 15, 2015 at 05:51 PM
I WOULD LIKE TO CUSTOMIZE THE FORM.I AM LOOKING FOR SOMETHING WHICH WONT ALLOW OUR CUSTOMERS TO PUT A TIME AFTER OUR STORE HOURS.OUR WORKING HOURS ARE MONDAY TO FRIDAY 8 AM -6 PM,SATURDAY 10 AM-3 PM AND SUNDAY 12 PM-3 PM.YOU GUYS SEND ME SOME INFORMATION EARLIER.BUT IT LOOKS IT DIDN'T WORK.IF YOUR CAN SEND ME AN EXAMPLE WIT MY OPERATING TIME THETAS MORE HELPFUL.OR IF YOU CAN COME UP WITH A YOU TUBE VIDEO ITS EVEN MORSE HELPFUL TO MANY CUSTOMERS LIKE ME.THANKS
time conditions show and hide store hours restrict times date selection business hours time selection dependent depends on
(Private)Answered by Jan on August 16, 2015 at 10:03 AM
You can use the "Time" tool under Quick Toools and the condition "Show / Hide form fields".
Please check this demo form: http://www.jotformpro.com/form/52273543228959. Please try adjusting the Time Hour and you will see the fields will be appear/disappear depending on the time.
0-7 hours - fields will be hidden
8-17 hours - fields will show
18-23 hours - fields will be hidden
These are the 2 conditions that I used. I used Before 8:00 and After 17:00 the fields will be hidden. So that the time between 8:00-17:00, the fields are showing.
Please know more about conditions by checking this guide: https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic
You can change the default time to "Current" to see it in live form. But for testing purposes, I chose "None" so that you can navigate the hours.
You will also need to hide that Time field.
Hope that helps. Please refrain from using all caps when posting your message. Thank you.
Just to expand on my colleague's reply, since your business hours vary depending on the day of the week, additional rules would need to be included in the form's conditions. It would also be necessary to include a separate time field for each type of day (weekday, Saturday and Sunday). To better understand what I mean, clone this demo and examine its settings. (Here's how to clone it.)
The Settings Explained
Firstly, you won't want people selecting past dates. You probably won't want them selecting dates too close to the form submission date either, since you would need to plan your work schedule. So, the following limits are in place on the date selector:
Here's how to use the Limit Dates feature.
The form has three (3) time fields but to avoid confusion when creating the conditions attached to them, they were originally labelled Pickup Time wday, Pickup Time sat and Pickup Time sun for the weekday, Saturday and Sunday selectors respectively. Here, the weekday time selector is shown, with its original label, when a weekday date is selected:
(August 21, 2015 is a Friday which, of course, is a weekday.)
Here you can see how confusion was avoided when creating the condition to show that field:
And imagine how tricky it could have been creating this other condition, were the time selectors' labels not originally appended with " wday", " sat" and " sun":
In order for the conditions to work correctly, it was necessary to have each time field's selections cleared upon being hidden. Also, you won't want the empty time fields to appear in any auto-responses received by users. Both settings can be found on the Advanced Settings tab of the form preferences:
Once all of the above was in place and the form was checked at its URL to confirm that the conditions were working correctly, all of the time fields were named simply Pickup Time and the autoresponder was created.
That's pretty much how it was done. If you need further help with this or anything else JotForm related, we'd be happy to provide it.