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

    is it possible to display a time range in a field?

    Asked by tammy1973 on January 12, 2016 at 05:35 AM

    I would like to have a field which shows a date range/period of time to make it clearer to the customer which period they are looking at.

     

    Customer enters the date of their closing balance in one field, e.g. 29.1.16

    The second field is a calculation widget which calculates the start date of the period as the date of the closing balance minus 28 days, e.g. 1.1.16.

     

    Ideally I would have a third field that I'd call 28 day period and which displays 11.1.16 - 29.1.16

    This would then be followed by a forth number field  with the question "what is the lowest amount in your account during this 28 day period?"

     

    Is it possible to display the date range as described as third field above? Many thanks, Tamara

     

  • Profile Image

    Answered by grade4pagasa on January 12, 2016 at 07:43 AM

    Hi tammy1973.

    Randy here, a fellow JotForm user.

    Does this sample form I made meet your specifications? 

    I didn't quite get your 4th specs about the lowest amount bit.

    Hope this helps while waiting for the JotForm Support Team's reply. 

    - Randy

  • Profile Image

    Answered by tammy1973 on January 12, 2016 at 07:48 AM

    yes, that's great, exactly what I need, but what formula did you use to get the date range?

  • Profile Image

    Answered by grade4pagasa on January 12, 2016 at 08:57 AM

    You can use the Form Calculation or a regular Textbox to get the desired result. 

    In this example, I used a textbox with the configurations detailed in figure 1

    If closingDate is Filled, then assign the text string value of closingDate to closing balance (txt) field. 

    This will make sure that the DDMMYYYY date format you specified will be followed. 

    You can clone the form I gave above by following the steps in this article

     

    - Randy

     

    figure 1

     

     

    figure 2 (how to change the values from number to text string)

     

     

     

    You can also use the dateString function but this will not follow the DDMMYYYY date format you want. 

  • Profile Image

    Answered by grade4pagasa on January 12, 2016 at 09:03 AM

    For the date range itself, I just used a textbox again to join the text values of the startDate and closingBalance fields with a dash (-) in between then assigned the resulting value to the field named date range.

    Apologies for creating a new post. I couldn't edit my reply above due to an unknown glitch.

  • Profile Image

    Answered by grade4pagasa on January 12, 2016 at 10:13 AM

    Here's a form with lesser fields & conditions (but will yield the same result).

  • Profile Image
    JotForm Support

    Answered by BJoanna on January 12, 2016 at 12:49 PM

    Thank you, grade4pagasa for providing this solution. 

    @tammy1973 

    Feel free to contact us if you have any other questions.

  • Profile Image

    Answered by tammy1973 on January 18, 2016 at 06:35 AM

    Thank you so much, I have now managed to do it, much appreciated.

  • Profile Image

    Answered by Carina on January 18, 2016 at 09:40 AM

    Thank you for updating us.

    If you need further assistance please let us know.

  • Profile Image

    Answered by AA_C on January 18, 2016 at 09:44 AM

    @Randy, You need to get on the staff, good work my friend.

  • Profile Image

    Answered by grade4pagasa on January 18, 2016 at 10:04 AM

    Thanks for the kind words, Robert

    I'm just a & frustrated-coder who tries to help fellow JotForm users anyway I can. 

    Much appreciated. 

    - Randy