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 can I autopopulate a second DateTime field and add days to it conditionally?

    Asked by kdevlin1983 on January 19, 2017 at 11:02 PM
    Admin email show show start and end date in one week or two week increments.


    This is the form I am currently working in:


  • Profile Image
    JotForm Support

    Answered by Jim_R on January 20, 2017 at 02:09 AM

    Hello @kdevlin1983, sorry but I failed to understand what you're trying to do. Are you asking how to setup your Email Notifications for the admin, in a way that it will show a start and end date?

    If that's what you're trying to do, just add 2 DateTime Fields on your form (that will act as the Start and End date respectively), then add/include those 2 fields on your Email Notification:

    Related guide: Setting-Up-Email-Notifications 

    In case we misunderstood your question, just get back to us with a bit more info and a clearer description of what you're trying to do so we can better assist you.

  • Profile Image

    Answered by kdevlin1983 on January 20, 2017 at 12:47 PM

    Thank you. I was trying to ask if I could use the date and time field to populate an end date automatically in the admin without having the user pick an end date. If/then conditional logic to two radial buttons...if they select one week, the admin email would show date +7 days,; if they selecte two weeks, the admin email would show date +14 days?

  • Profile Image
    JotForm Support

    Answered by Jim_R on January 20, 2017 at 02:12 PM

    I see, thanks for clearing that up. Yes, it's possible to populate another DateTime field based on user input. Since I'm not sure how you want this incorporated on your form, I just created a simple test form showing how it works: https://form.jotform.com/70195972540965

    If you would test my form, ensure you will enter your email so you can get an idea of how the email would look like once it's received. You may also clone my form to better understand how it was setup.

    Related guide: How-to-clone-an-existing-form-from-a-URL

    Two conditions were created for this form - One for the 1 week option and another one for the 2 weeks option.

    It's important that you should check that the Start Date field is filled out first to ensure that the End Date result is calculated properly when adding either 7 or 14 days.