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

    Calculating time - 2 hours extra in confirmation mail

    Asked by besam on January 28, 2014 at 06:01 AM

    I'm wondering if I can work with the time... 

    My customers will be able to order printed business cards by a form. That works fine. 


    They will receive a confirmation mail with all details of data they have provide and they are able to check if all data they have provided is correct. If they don't make changes all data will be printed as it is...  

    And if they want to make corrections, they have to use the included edit link to make changes.

    But I want to tell them they will have only 2 hours to make the corrections if needed. If no corrections or after 2 hours the print order will be print as it is. 

    Will it be possible to "count" with the time in the confirmation mail and to show the customer the deadline time they have to make corrections. So correction time will be closed at 10.30 AM  ? This is adding 2 hours extra on the subscription time? 
    Is this possible and how I have to do this?

    Thanks for your answer !

     

    edit link print check thanks
  • Profile Image

    Answered by jedcadorna on January 28, 2014 at 06:29 AM

    Hello,

    Thank you for contacting us.

    I don't see this possible in Jotform's form builder. The closest that I can think of with the form builder was using the Expiration Date as it does has time in it. That would be under Preferences > Setup & Embed > Form Limits > Expiration Date

     

    User guidehttps://www.jotform.com/help/137-How-to-Limit-Submissions-in-a-Form

  • Profile Image

    Answered by besam on January 28, 2014 at 09:33 AM

    Thanks, but that's not a solution for me. 
    This makes the form will expire on a date/time. But my form will be used continuously. It's not the subscription what will expire... 

    I was thinking more in something as generating a new (hidden) field in the form (calculate actual TIME + 2hrs).
    And this new field I can take over the confirmation mail.

    But how to calculate with time values? It's HOUR+2, but that's the theory.
    In practice it would be more complex I'll guess ;-)  

  • Profile Image

    Answered by jedcadorna on January 28, 2014 at 09:44 AM

    Hello,

    Using custom CSS code you can hide the date and time field like this

    #id_XXX{

    visibility:hidden;

    }

    But i'm still thinking how to apply the expiration since we can hide the CSS field. I will make some research or probably some of my colleagues might have a workable solution.

  • Profile Image

    Answered by besam on January 29, 2014 at 06:13 AM

    Hi 

    Thanks for your answer.
    But be aware you're not searching and looking for a solution for something else :-)
    The problem will not be visible or not visible, that's not the thing...

    The thing will be how to calculate two extra hours extra on the subscription time and putting this value in a new (hidden) field. The subscription time can also be the system time on the computer of the user. And this time hasn't to be exact on the second. Just roughly 2 hours extra so I can tell te customer a deadline time before he's able to make corrections in the form (time+2hrs) 

    Thanks ! 

     

  • Profile Image
    JotForm Support

    Answered by TitusN on January 29, 2014 at 08:28 AM

    Hello,

    Thank you for your response.

    We are currently considering  a possible solution to your requirement: A way to alert your users that they cannot modify changes on the form after 4hours since submission. 

    We will update this thread as soon as possible.

    Thank you for your patience.                                              

  • Profile Image
    JotForm Support

    Answered by TitusN on January 29, 2014 at 08:29 AM

    My apologies, I meant two hours after submission.

  • Profile Image

    Answered by besam on January 29, 2014 at 09:44 AM

    Great !!! 

  • Profile Image

    Answered by besam on January 30, 2014 at 07:12 AM

    Hi

    I absolute don't want to push you. But I'm curious to know if you have already found a solution for me.
    Cause I have to start with using the form soon...

    Thanks a lot !!!

  • Profile Image

    Answered by jedcadorna on January 30, 2014 at 07:29 AM

    Hello,

    Sorry for replying so late. The solution that I found was downloading your form source then modifying the jotform.js to add the .getHours() + 2; value then upload the complete file to your webpage.

    Please see this sample https://shots.jotform.com/jed/forms/+2hours.htm I made and fill in your email address so you will have an idea what it looks like when user receive the notification. Then let me know if this is what you want.

  • Profile Image

    Answered by besam on January 30, 2014 at 09:11 AM

    Hello jedcadorna

    Thanks for your fast replay!
    The result on screen is more or less what I want to show. But I still believe it can even more on an easy way... 

    My proposal:
    (1) On the form we will create a new field, lets say we'll call it "test" - and we make this field hidden. 
    (2) On the form we'll also create a new field Widget "DateTime Single". This field will be provided automatic with the actual time when the form will be opened by the customer. Right? So far everything easy ;-)

    (3) So, point is our new field "test" have to be filled with the calculation of the value of the "DateTime Single field + 2 hours".
    That's all... So when filled, the value of the field "test" is the date/time I'll want to have !!! 

    Later we can use the field "test" in all confirmation mails etc. cause it's a normal Jotform field that we can use for all mails and 'thank you' pages.  

    The (only) thing is - and this I don't really know how to do - is how to get the value of the DateTime String add with 2hrs extra in the field "test".
    Must be one or other easy formula. That's the (only) thing ;-) 

    I will use this solution in a lot of different forms, so that'salso the reason why I'm looking for an extra "field" solution and not in a modified jotform.js solution... 

    Or will I believe in things what are not possible ? :-) 

    Thanks a lot !!!

     

  • Profile Image
    JotForm Support

    Answered by EltonCris on January 30, 2014 at 11:09 AM

    @besam

    Thanks for your clarification!

    I believed that's not possible using a widget. DateTime Widget runs in an iframe container, so it is quite impossible to capture its data within the downloaded form source code. You may however use "DateTime" field under Quick Tools and enable its default time. See visual guide below:

    After adding this field to your form and a hidden field for prepopulation, let us know the form URL so we'll try to come up a custom script for you that would perform this function. Keep in mind that once you take your form source code, you can't place it back to Jotform. You have to host your form source code on your server.

    Thanks!

  • Profile Image

    Answered by besam on February 03, 2014 at 04:48 AM

    Thanks for your answer.
    I was some days out, so sorry for delay.

    We can't host the form ourself, so it seems we have to do something else.
    I tried to use the DateTime field (set on default time). That works. The  I can say to the customer "2 hours left from now on and display the date/time)

    I can also hilde this field on the form, but then it's not possible anymore to use it in the confirmation mail cause the hidden field will not be displayed in the mail.
    Or will there also be a work-around for this?

  • Profile Image

    Answered by jedcadorna on February 03, 2014 at 08:28 AM

    @besam,

    Hosting your form to your server is the only option that I can think of modifying the DateTime field as no other option in the form builder that would allow you to do exactly what you want. If you put the DateTime field that would be editable when users view your form.

    The solution that I provided that will increment +2 hours will be based on just one timezone the downside of that if your user is not on the same timezone the date displayed using DateTime field will not match the + 2 hours modified in the form source.

    If you download the form source you can apply custom script to disable input type field for editing so you can have it displayed but the user won't be able to edit the DateTime.