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.


  • Profile Image

    How can I subtract 90 minutes from the Time Field?

    Asked by hsts on June 07, 2017 at 12:37 PM

    Wondering if the calculator or any other available widget will calculate time?

    Specifically, what I'm looking to do is have the submitter enter a time and have 90mins subtracted from that time and output for the submitter. 

    Ie. Submitter inputs 3:30pm and the calculator subtracts 90mins and outputs 2:00pm. 

    Thanks,

    Trina

  • Profile Image
    JotForm Support

    Answered by Jim_R on June 07, 2017 at 02:04 PM

    Hello Trina - I'm not 100% sure if this is doable but I'm currently fiddling around with the Time Field and Form Calculation. As soon as I have some results (good or bad), I'll let you know on this thread. Stay tuned!

  • Profile Image
    JotForm Support

    Answered by Jim_R on June 07, 2017 at 02:33 PM

    All right, does this form fit your needs https://www.jotform.com/71575675487978?

    If it does, can you clone that form and have a look at how I set it up? Basically, I used 1 Time Field and 4 Form Calculation Widgets to achieve that.

    Complete guide: How-to-clone-an-existing-form-from-a-URL

    If that works for you and you still need further explanation on how that was achieved, just let me know and I'll break it down into a step by step guide.

  • Profile Image

    Answered by hsts on June 07, 2017 at 03:01 PM

    Thank you so much.  This is exactly what I needed.  I'm going to try and follow it through so you don't need to do the step by step.  Much appreciated!

  • Profile Image
    JotForm Support

    Answered by Jim_R on June 07, 2017 at 03:24 PM

    I'm glad that's exactly what you need. I failed to mention this only works well with 10 min stepping on the Time Field or above. Using 1 or 5 min stepping would result to some time formats that won't have a trailing 0.

    Sadly, that's just a limitation with how subtraction works. We can't place any trailing zeroes to whole numbers (from 1 to 9).

     

  • Profile Image

    Answered by hsts on June 07, 2017 at 03:30 PM

    Okay, thanks for information.  I did change to 1 stepping increment already as this is what we would need.  Now that you said wouldn't work well I went back and tested.  From what I can see only the 31-39 min increments seem to spit out the incorrect result.  This make sense that only that range?

  • Profile Image
    JotForm Support

    Answered by Jim_R on June 07, 2017 at 04:11 PM

    Sorry but I need to correct the term I used - It's not trailing zeroes but rather leading zeroes.

    When using 1 minute or 5 minute stepping, any difference that would result from 0 to 9 would not show a leading zero. That's why a minute selection of 30 to 39 minus 30 would result to a range of differences from 0 to 9 (instead of 00 to 09).

    I tried playing around with conditions and managed to find this workaround:

    Just ensure that once you're setting up each of these 10 conditions (from 0 to 9), click the leading 0 so it has a brown background. Refer to the screencast below:

    Check my test form again https://www.jotform.com/71575675487978 to see it in action.

  • Profile Image

    Answered by hsts on June 08, 2017 at 07:48 AM

    That worked great, thank you again!  Very impressed by the support.  

    One last question, what is clicking on the zero and the background being brown actually trigger?

     

  • Profile Image

    Answered by hsts on June 08, 2017 at 07:57 AM

    I lied, I have another question.  Is there any workaround to have the final time in 12hr format?

  • Profile Image

    Answered by hsts on June 08, 2017 at 08:28 AM

    I'm sorry another question -

    My form seems to be defaulting to have 10:30 in the output time field.  I'm unsure why this is. I have tried the default result set to 'blank' and '0' neither options are changing the default result when no time has yet been entered into the entry field.

    Form link: https://form.jotformpro.com/71575830752966

  • Profile Image
    JotForm Support

    Answered by Nik_C on June 08, 2017 at 11:47 AM

    One last question, what is clicking on the zero and the background being brown actually trigger?

    If you meant how to remove the yellow highlight around the field, here is how to do that:

    -Click Settings-Show more options:

    -Scroll a bit down and disable it:

    Is there any workaround to have the final time in 12hr format?

    I tried to make this work but it will be hard to make it work properly because of the negative value you get when the number is less than 1.5 (90minutes). I will have to check that more and if I make it work I'll get back to you.

    I opened a new thread for your last question and we will attend it here shortly: https://www.jotform.com/answers/1167456

    Thank you!