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.
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
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.
yes, that's great, exactly what I need, but what formula did you use to get the date range?
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.
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.
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.
Here's a form with lesser fields & conditions (but will yield the same result).
Thank you, grade4pagasa for providing this solution.
Feel free to contact us if you have any other questions.
Thank you so much, I have now managed to do it, much appreciated.
Thank you for updating us.
If you need further assistance please let us know.
@Randy, You need to get on the staff, good work my friend.
Thanks for the kind words, Robert !
I'm just a & frustrated-coder who tries to help fellow JotForm users anyway I can.