- carolinaruggerfestAsked on April 25, 2017 at 06:11 PM
We have a rugby tournament where teams order team meals (in bulk) from the local Subway. Typically they order 40 meals or more when they order. Because of the large order... the local Subway can't process the order without enough notice.
What I need is to be able to restrict ordering meals if they are trying to do it inside of 2 hours of when they want them to be ready.
So for example - if a team wants to order 40 meals to be ready by 12noon, they have to place the order by 10am at the latest. If they want the meals to be ready by 12:30pm, then they have to place the order by 10:30am.... and so on. If they try to place a meal to be ready by 12noon and it's currently 11am, it should not allow them to select 12noon as an option. The earliest option for the order to be ready should be defined as 1pm.
I need to form to always identify the current time to not allow an order to be placed with less than 2 hours for the local Subway to prepare the meals.
Is this possible? If so, how do I accomplish this?Page URL:
- JotForm SupportChriistianAnswered on April 25, 2017 at 10:00 PM
I'm currently checking your requirements. Please allow me some time to further check on this. I'll get back to you once I've found results.
- JotForm SupportChriistianAnswered on April 25, 2017 at 10:53 PM
Thanks for your patience.
The possible workaround for this requirement is to calculate the time using the Form Calculation Widget. Then, set a condition to hide the Submit Button if the chosen time is not 2 hours in advance from the current time. Please see the instructions below on how to achieve this:
1. Add two Time fields for Pickup Time and for the Current Time. Set both to 24 hours. And hide the Current Time field.
2. Add a Form Calculation Widget and hide the widget. Perform a calculation to subtract the value of Pickup time to Current time.
3. Set up a condition on your form to hide the submit button unless the calculation field is equal to 2 for (2hours).
If you need further assistance, please let us know.
- carolinaruggerfestAnswered on April 25, 2017 at 11:18 PM
Thanks for this!
But it's not working for me on your form. Maybe it's because it is 11pm here (EST) and in order for me to be more than 2 hours from current time, I also have to change the date to the next day and choose something beyond 1am (EST).
So this tells me that the date has to also be included in the calculation... not just the time. This would make sense anyway as I would want teams to place their orders a day or two in advance up until 2 hours prior to the actual time they need it.
Does this make sense?
- JotForm SupportChriistianAnswered on April 26, 2017 at 01:46 AM
Apologies for the broken link of the demo form. Here's the correct link to my demo form: https://form.jotformpro.com/71148312463956. It should be working on your end if you have cloned it regardless of the time zone. The time should automatically adjust when you cloned it on your account.
However, if you want to include the date, you can also add the Date/Time picker with the same procedure on how to calculate using the Form Calculation Widget.
Here are sample calculations to get the total hours:
Then lastly, if you would want teams to place their orders a day or two in advance up until 2 hours prior to the actual time they need it, you can set up the condition that if it is is equal or greater than 2 hours, show the submit button.
Here's my second demo form with Date/Time Field: https://form.jotform.com/71150869263964
- carolinaruggerfestAnswered on April 26, 2017 at 11:15 AM
This works great! Exactly what I was looking for.
I have another question about this form, but will start a new thread.