How to change the default date on my form?

  • mijot
    Asked on September 28, 2016 at 11:36 AM

    Is it possible to default the DateTime field to yesterday's date (or tomorrow's date) instead of current date?

    To make the question a bit more generic; is it possible to have a variable date (last week, next month, etc.) without writing for example a javascript function?

  • Kiran Support Team Lead
    Replied on September 28, 2016 at 2:23 PM

    You may set any other date then the current date for the Date Time field from the field properties. Please see the screenshot below:

    How to change the default date on my form? Image 1 Screenshot 30

    If you want to display a different date by calculating the number of days, you may set up a condition to calculate the date by adding another date field. Please see the screenshot below that can help you with setting up the condition.

    How to change the default date on my form? Image 2 Screenshot 41

    Here Date 1 can default to current date and you may add/subtract the number of days required in the condition to display the result in Date 2. You may also hide the Date 1 field so that the user can view only the calculated date.

    Hope this information helps! 

  • Kiran Support Team Lead
    Replied on September 28, 2016 at 2:26 PM

    Here is the demo form with the condition above:

    https://form.jotform.com/62715028956967

    Please feel free to clone the form to your account to test it further.

  • mijot
    Replied on September 28, 2016 at 4:05 PM

    That is a great suggestion and it did solve my problem.

    Thank you