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 Do I Have a Field Display a Date Which Is a Specified Number of Days Prior to That Selected in a Date Field?

    Asked by lauren.whiteaker on July 08, 2015 at 06:02 PM

    is there a way to calculate a date based on another date entered in a different field? i.e. Date of Demo would produce a Call Date seven days prior based on the date entered for demo?



    This is a re-post of a comment on How to Pass Field Value to Another Field?

    calculate days calculate dates show different date form calculation output date
  • Profile Image
    JotForm Support

    Answered by EltonCris on July 08, 2015 at 08:16 PM

    Yes that's possible. You can achieve it by creating conditions (Example form: https://www.jotform.com/form-templates/calculate-number-of-days, feel free to clone it so you can check the conditions) or by using this widget. http://widgets.jotform.com/widget/dates_difference

    Then use a form calculation widget to get the result. Example:

    Hope this helps!

  • Profile Image
    JotForm Support

    Answered by abajan on July 08, 2015 at 09:27 PM

    Hi Lauren,

    In addition to my learned colleague's solution, please see this form which uses another method. If you were to clone it and examine its saved condition, you'll see the following:

    To construct the expression seen in the work area above, I clicked the button with the ellipses (...) and then clicked the dateString() method:

    Then I clicked the Back button (in the screenshot above), clicked between the parentheses to place the insertion point there and clicked Add Field and inserted the demo date field:

    Then it was just a matter of typing -7 after it to output a date seven (7) days earlier.

    If any of this is unclear, please inform us.

    Cheers

  • Profile Image

    Answered by lauren.whiteaker on July 09, 2015 at 10:03 AM

    This worked great! Thanks so much!!!

  • Profile Image
    JotForm Support

    Answered by EltonCris on July 09, 2015 at 11:38 AM

    @lauren.whiteaker

    Glad to hear it.

    Cheers!

  • Profile Image

    Answered by kingfisherweddings on February 06, 2016 at 07:28 AM

    How do you get the conditions wizard to look like that I can only get the calculation wizard to do this. And I cannot get it to work. How frustrating it is grrrrr
  • Profile Image

    Answered by kingfisherweddings on February 06, 2016 at 11:31 AM

    Great idea but even though i cloned the form it didn't work :(

  • Profile Image
    JotForm Support

    Answered by Boris on February 06, 2016 at 08:46 PM

    @kingfisherweddings in order to assist you better and so that are messages are not sent to all previous participants of this support thread, your question has been moved to a support thread of its own:

    http://www.jotform.com/answers/766252

    We will assist you with your question there, shortly. Thank you.