How to add 2.5 hours ahead in the Time field?

  • SAL105
    Asked on April 17, 2024 at 12:50 PM

    I would like to have the submitter enter a start time and the end time auto fill with a calculated time.

    For example,

    If they enter 7 p.m. start, I would like the end time to automatically read 2.5 hours after the start time.

    Start 7:00 PM End 9:30 PM

    Thank you,

  • Gaud JotForm Support
    Replied on April 17, 2024 at 1:30 PM

    Hi Sandy Lynch,

    Thanks for reaching out to Jotform Support. I've checked out the example you shared about your requirements for the time. You want to have 2 hours and 30 minutes added to the start time. Allow me some time to check on this and I will get back to you with an update.

    Thanks for your patience and understanding; we appreciate it.

  • SAL105
    Replied on April 17, 2024 at 2:13 PM

    Thank you!

  • SAL105
    Replied on April 18, 2024 at 1:20 PM

    Hello,

    I added time with a range.

    I added a calculation field.

    Unsure how to make it autofill the end range 2.5 hrs later.

  • Jerlan JotForm Support
    Replied on April 18, 2024 at 1:50 PM

    Hi Sandy,

    Thanks for getting back to us. Can you share your form URL? This will help us better understand what's happening and help you with the solution.

    Once we hear back from you, we'll be able to help you with this.

  • SAL105
    Replied on April 18, 2024 at 2:44 PM

    https://springbrook.jotform.com/build/241054480325045

    For Start Nap Time I want to be able to enter a start time and the end time autofills in with a time that is 2.5 hrs after the start time.

  • Gaud JotForm Support
    Replied on April 18, 2024 at 3:49 PM

    Hi Sandy Lynch,

    Thanks for patiently waiting. I've got an update on your request. The form URL you shared with us seems to be from the Enterprise account. Unfortunately, it is not possible to achieve the results using the time field. As a workaround, you can use the Date Picker Field with the time option enabled in it. Then you can use the Form Calculator widget to add the hours to the time field. Let me show you how to do it:

    1. In Form Builder, click on the Add Form Element menu on the left side of the page. 
    2. Scroll down and add the two Date Picker fields. Enable the time field option under the time tab.How to add 2 Screenshot 60
    3. Select the current option for the Date and Time fields in both elements.How to add 2 Screenshot 71 How to add 2 Screenshot 82
    4. Add Update/Calculate Field conditional logic to add the 2.30 hours ahead. How to add 2 Screenshot 93

    Here is my result:

    How to add 2 Screenshot 104

    Here is my demo form; you can check it out and clone it.

    Let us know how it goes.

  • SAL105
    Replied on April 22, 2024 at 3:01 AM

    Looks to work! I have it being reviewing by the requestor to see if it fits their need. Thank you,

 
Your Answer