Is there a way to have a date field that shows today's date?

  • Profile Image
    PESJotForm
    Asked on December 07, 2020 at 05:16 PM

    Is there a way to have a date field that shows today's date? It would need to update when the form is edited?

    I want to use this date to calculate a date difference from when the form was created until today.

    I have set the date field to default to today, but it only does this for the initial filling out of the form. Is there a way to have it update when you edit a form?

  • Profile Image
    Kenneth_C
    Answered on December 07, 2020 at 08:39 PM

    Thank you for reaching support,

    Simply go to the field Properties > OPTIONS > Default Date > CURRENT:

    1607391444_5fced8d4a267a_c1.png

    I hope that helps.

    Best.

  • Profile Image
    Clayton 
    Answered on December 07, 2020 at 08:58 PM

    Yes it does this for the initial fill out, but when you edit 2 days later, it still has the original date and does not update to today. Thank you.

  • Profile Image
    Kenneth_C
    Answered on December 07, 2020 at 10:43 PM

    Hi there,

    You may need a separate date field for the current date and another filled for the submission date. You can follow my recommendations above for the current date then use the UPDATE/CALCULATE Field condition to calculate the difference. Here is the guide: https://www.jotform.com/help/268-how-to-insert-text-or-calculation-into-a-field-using-conditional-logic.

    In my Demo form: https://www.jotform.com/help/268-how-to-insert-text-or-calculation-into-a-field-using-conditional-logic

    I added two date fields, a short text box for the difference on the dates and a "Get Form Page URL" to identify that the page is currently on edit mode:

    1607398895_5fcef5ef42435_g1.png

    Then here are the conditions:

    1607398926_5fcef60e32f2e_c1.png

    Feel free to clone my Demo form: https://www.jotform.com/help/42-how-to-clone-an-existing-form-from-a-url

    Awaiting your response.

    Best.

  • Profile Image
    Clayton 
    Answered on December 08, 2020 at 07:39 AM

    Yes I have done this already. How do I get the current date?


    The date does not update when I edit the form. It stays as the same date that I filled out the form.

  • Profile Image
    Kenneth_C
    Answered on December 08, 2020 at 08:11 AM

    Hi there,

    I cloned and tested the form and I was able to replicate the issue.

    Can you please follow the recommendations of my colleagues on this support ticket: https://www.jotform.com/answers/1809865-When-user-edits-form-response-more-than-once-Current-Date-is-not-working

    And let us know how it goes.

    Best.