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

    Limit an End Date field's selections based on a Start Date field's input?

    Asked by MBLicenseManager on August 08, 2016 at 11:31 PM
    Is there another solution to limit an End Date field's selections based on a Start Date field's input?
    limit date
  • Profile Image
    JotForm Support

    Answered by jonathan on August 08, 2016 at 11:38 PM

    Can you describe more how the date limits was suppose to work on your form.

    I checked your form https://www.jotform.com/62163902347959 and I see 2 DateTime field. A Start and an End date.

    If I understand correctly you want to limit the date range within the Start and End date input. Why can we not just put a date on both date field? (a start and an end date)

    We will wait for your updates.

     

  • Profile Image

    Answered by MBLicenseManager on August 09, 2016 at 10:31 AM

    Hi, 

    The goal is to prevent the user from selecting an "End Date" input that precedes the "Start Date" input.

    If the user selects 08-16-2016 for a Start Date input, the End Date input's available choices would begin on 08-16-2016 and all dates before 08-16-2016 would be unavailable; like in the screenshot below. 

    Since the "Start Date" input is a variable, the "End Date" input's start date setting, ideally, would also be a variable based on user input; not a pre-determined date.

    I've disabled the past dates, which is helpful. But a project might start 2-3 months after the date the request is submitted.

    From a user's perspective, they scroll ahead 2-3 months to get to the Start Date. Then, for the End Date, they have to click through again at least 2-3 months, probably more if the project's end date is 6-7 months after start date.

    It would be a nice feature to have. This Start Date/End Date situation is used in more than 10 forms so far.

    JotForm has been really great for our organization. Thank you for all the helpful tools and your fantastic customer service.

    Cheers.

  • Profile Image
    JotForm Support

    Answered by Jim_R on August 09, 2016 at 12:02 PM

    Thank you for the warm appreciation, it's nice to see that JotFrom has been a great tool for your organization :)

    I reviewed your previous correspondence with my colleague and I understand what you're trying to achieve.

    I've disabled the past dates, which is helpful. But a project might start 2-3 months after the date the request is submitted.

    Glad you figured out that you can toggle that option to limit users from selecting past dates.

    From a user's perspective, they scroll ahead 2-3 months to get to the Start Date. Then, for the End Date, they have to click through again at least 2-3 months, probably more if the project's end date is 6-7 months after start date.

    Indeed - The good thing is, this can be overcome by setting up a condition which will copy the value of the Start Date then push it to the End Date. That way, your users won't have to re-click from today up to the future date that was pre-selected on the Start Date.

    At the moment, this is how your form works. In this example, I will be simulating the same example you have given. I'll pick a Start Date 3 months from now:

    On my cloned form where the condition was setup, this is how it looks like:

    Here's how the condition was setup:

    Here's the link to my cloned form https://form.jotform.com/62215115113944 in case you wanted to check and clone it. Please give it a spin and let us know if that fits your requirement. We'll be patiently waiting for your reply.

  • Profile Image

    Answered by MBLicenseManager on August 09, 2016 at 12:39 PM

    Thanks for the demo. It's so close...

    The conditional statement helps with the "jump" but the dates before the Start Date input are still available.

     

    That's why the adding the Start Date ID in the old editor was so nice. The new editor doesn't allow custom text in the "Start & End date" limits:

  • Profile Image
    JotForm Support

    Answered by Kevin_G on August 09, 2016 at 02:31 PM

    The option is still there, the only difference is that will not allow you to add custom text as you did on the old wizard: 

    What you can do is use conditions to achieve it, the first that you will need to do is adding the Form Calculation widget to your form and then calculate the number of days between both dates, start and end. 

    This will calculate, and if the end data is less than the start date then the result will be, for example, -1 depending on the selected date. 

    Now, add a text message to indicate user that end date must be greater than start date: 

    The next step will be adding the condition, it should be like this: 

    Here is the link to my cloned form where I applied this, please take a look: https://form.jotform.com/62215309877966 

    Hope this helps. 

  • Profile Image

    Answered by MBLicenseManager on August 09, 2016 at 04:41 PM

    Thanks Kevin_G for your suggestion.

    Unfortunately, I have too many forms with a Start Date/End Date input fields to set up and maintain that many conditions.

    As long as the old editor is available, I'll stick with entering the Field ID in the "Start & End date" in the old editor.

    Please let me know if/when the new editor allows for custom text in the "Start & End date" settings.

    Thanks for your time.

  • Profile Image
    JotForm Support

    Answered by jonathan on August 09, 2016 at 04:53 PM

    Thank you for taking the time providing to us with more detailed explanation. It helps in understanding more about your requirement on the form.

    Since we had already submitted the ticket report to our higher team support via this thread https://www.jotform.com/answers/901256 , we will have to wait for the updates then from the developer assigned to the ticket.

    Contact us again anytime if you have other question/concern.

    Thanks.