Time Range: Is there a way we can verify users to choose 2-hour time blocks

  • vipselly
    Asked on August 2, 2017 at 6:54 PM

    I have one more question: Is there a way we can verify or force users to choose 2-hour time blocks?

    Here's the new url of our form: http://locksmithservices247.com/Yelp-Locksmith-Service-Request.html

  • jonathan
    Replied on August 2, 2017 at 11:17 PM

    You will have to use 2 Time field to be able to calculate the time range and use condition logic to prevent user from going forward if time range is below 2-hours block.

    Example:

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 1 Screenshot 20

     

    In my example, the Calculation will capture the time block. You can use then the value to setup the Conditions.

    I hope this help. Let us know if you need further assistance on this.

     

  • vipselly
    Replied on August 3, 2017 at 11:18 AM

    Hi Jonathan,

    I think I understand how to make the calculation part of this work, but I don't get the step that comes before it. What kind of widget do I use to get the "Time 1st" and "Time 2nd" fields in your example?

    Would it be possible for you to share a url with me so I can clone your example and study it?

    thanks,

    S

  • Chriistian Jotform Support
    Replied on August 3, 2017 at 1:18 PM

    I think my colleague has used the Time field

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 1 Screenshot 30

     

    and he set it to a 24-hour format to simplify the calculation.

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 2 Screenshot 41

     

    I think the form he used is https://form.jotformpro.com/72138909079971. You can clone it to your account.

  • vipselly
    Replied on August 7, 2017 at 4:32 PM

    That's helpful. But as a condition, is there a way to give the user a message telling them to change the second time in the range in order to create at least a two hour range?

    I can't simply set the condition to require that field, because whatever they enter fulfills that requirement. How would you suggest letting the user know what we want from them?

     

    thanks

  • Chriistian Jotform Support
    Replied on August 7, 2017 at 4:58 PM

    You might need to add another Number field which can be validated to not be less than 2. Please see steps below.

     

    1. Add Number field.

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 1 Screenshot 50

     

    2. Set the minimum value of this Number field.

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 2 Screenshot 61

     

    3. Create a condition that will simply copy the value from you Calculation field to your newly added Number field.

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 3 Screenshot 72

     

    The result should be as follows.

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 4 Screenshot 83

     

    You may check and clone this form: https://form.jotformpro.com/72186040105950.

  • vipselly
    Replied on August 8, 2017 at 3:45 PM

    1) Is there a way to modify the error text showing in red in this example?

    2) Can we make that "Difference" field a hidden field? This is looking very confusing, I think, from the visitor's perspective.

     

    thanks,

     

  • AIDAN
    Replied on August 8, 2017 at 6:13 PM

    We will be addressing your requests in these two new threads respectively: https://www.jotform.com/answers/1219103 and https://www.jotform.com/answers/1219104

  • vipselly
    Replied on August 9, 2017 at 7:10 PM

    Hi.

    Thanks again. I looked at the form (https://form.jotformpro.com/72186040105950) very carefully. I think I mimiced the calculation and difference blocks, but they don't work the same way yours do. Here's my form: https://www.jotform.com/build/72115259932861

    Also, I had this form set up so that "Date Reservation" and the earlier version of how we were asking people to pick times would all copy their values to the field called "Date and Time Slot." It looked like this:

    8/7/2017 2:00 - 4:00

    But in adding the functionality of verifying the 2-hour time block, I was advised to switch to two time fields instead of the time range fields I had been using. I tried adding conditionals to the new fields to get this to work again, but it no longer works the way it did. Now, when I set it up, only one of those fields gets copied to "Date and Time Slot" and gets overwritten by the value of the other fields once they're filled in.

    Your advice would be greatly appreciated.

    S

  • Kevin Support Team Lead
    Replied on August 9, 2017 at 8:38 PM

    Thanks again. I looked at the form (https://form.jotformpro.com/72186040105950) very carefully. I think I mimiced the calculation and difference blocks, but they don't work the same way yours do.

    I can see the calculation is not the same on your form, you would only need to invest the fields, "Choose a time 2 hours later:" needs to be the first one: 

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 1 Screenshot 40

    But in adding the functionality of verifying the 2-hour time block, I was advised to switch to two time fields instead of the time range fields I had been using. I tried adding conditionals to the new fields to get this to work again, but it no longer works the way it did. Now, when I set it up, only one of those fields gets copied to "Date and Time Slot" and gets overwritten by the value of the other fields once they're filled in.

    I have checked your form and I can see you are currently capturing the fields in the hidden calculation widget: 

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 2 Screenshot 51

    But there is a missing condition, I think you could add it and it should not conflict with the other conditions on your form: 

    Time Range: Is there a way we can verify users to choose 2 hour time blocks Image 3 Screenshot 62

    Please let us know how the form behaves once you have made these changes. 

     

  • vipselly
    Replied on August 14, 2017 at 1:14 PM

    Hi!

    Thanks again for the good advice.

    I inverted the calculation and that part of the form now works. We can force users to create a 2-hour time block.

    The second issue is closer to being resolved. I'm trying to add the data from multiple fields into the "Your Date and Time Slot" field. I want the result to display like this:

    8/14/2017  1:00 - 3:00

    But what I currently get is this:

    08/26/2017    13- 15

    The fields that I'm trying to copy time data from are 1) Requested Arrival Time and 2) Choose a time 2 hours later.

    https://www.jotform.com/build/72115259932861

    Thanks,

    S

  • Kevin Support Team Lead
    Replied on August 14, 2017 at 1:31 PM

    Glad to know you were able to resolve your first issue. 

    The second one has been moved to another thread, we will assist you as soon as possible here: https://www.jotform.com/answers/1223109