-
DCYFnutritionAsked on January 23, 2020 at 7:02 PM
I am creating an application where I need to know the start time for 2 meal services, but it is required that the start times must be 3 hours apart and the meals times cannot overlap. Is there a way to put this restriction on the application?
-
David JotForm Support ManagerReplied on January 23, 2020 at 10:30 PM
Hi, probably the only close solution would be calculating the difference with a Form Calculation widget: https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget
Then, create a condition to show a warning and hide the submit button:
Result: https://form.jotform.com/200228747395056
Unfortunately, there is no way to prevent that the "Until" part of the "Snack service" overlaps with the start time of the "Lunch Service". Let us know if you have more questions.
-
DCYFnutritionReplied on January 24, 2020 at 3:39 PM
Thank you for your help. The widget works if snack service is always before lunch. But what if there is the possibility that the snack happens after lunch as well? The numbers become negative. Is there a way to get around that?
-
David JotForm Support ManagerReplied on January 24, 2020 at 5:31 PM
I think I found a workaround, please test this form: https://form.jotform.com/200236707103947
I basically added another Form Calculation widget to turn the negative value to positive:
And set up this conditions:
Example:
You may clone it if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL