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 clear the Date Field using Conditions?

    Asked by Alik17 on March 24, 2017 at 02:50 AM

    That is not the same issue. On that thread it wasn't saving input in Edit mode.

    What is happening here (at this new link: http://form.jotform.com/70816455915159, not the old one on this thread) is it doesn't want to take my input in the first place when I turn on "clear on being hidden." When I try inputting a date in Section V, it flashes the date and then clears it. And this happens for all date fields that I have. Try it for yourself.

    Here's a demo:

  • Profile Image
    JotForm Support

    Answered by ashwin_d on March 24, 2017 at 02:53 AM

    Hello Alik17,

    I did check your form and found that you have added condition to clear the value of date field. Please check the screenshot below:


    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image

    Answered by Alik17 on March 24, 2017 at 07:33 AM

    Yes, but that condition should not be clearing the field when a date is entered. It's saying if the checkbox field is FILLED, clear it, but the checkbox field is not filled, especially in the beginning.

  • Profile Image

    Answered by Alik17 on March 24, 2017 at 09:32 AM

    I have tried disabling that condition on Special Exception 1, and indeed it works now. But still, logically it should work... Why does it not?

    If we can't figure this out, is there another way to make a button that clears the date?

  • Profile Image
    JotForm Support

    Answered by Jim_R on March 24, 2017 at 12:44 PM

    I fiddled around with the workaround you're using (INSERT space INTO DATE). It does work however, the user has to tick/untick the checkbox to trigger the condition.

    I'm afraid there's no way to add a button to your form that will clear the date. If I may ask, what's the reason behind clearing the date? Won't it suffice to just conditionally HIDE/SHOW the field instead?

    Also, if you will move forward with the checkbox toggle to clear the date, perhaps we can help you in making the field look more like a button. Just keep in mind that this may cause confusion to your end users since buttons usually trigger on click, while the checkbox only gets triggered if it's in the state that meets the condition (either ticked or unticked).

  • Profile Image

    Answered by Alik17 on March 24, 2017 at 02:44 PM

    We need the clear function. If a user enters a Special Exception, and then decides they don't want it, we want to allow them to clear it. Is there another way to do this?

  • Profile Image
    JotForm Support

    Answered by Jim_R on March 24, 2017 at 04:12 PM

    Understood - For now, the only way to achieve this is to use a checkbox, in conjunction with a condition to insert a blank value into the Date Field (to clear it).

    Can you have a look at this form https://www.jotform.com/70824560638965 and see if that will fit your needs?

    The logic I used for the Conditions are as follows:

    1. IF Date IS FILLED, tick the checkbox

    2. IF Date IS FILLED, enable the checkbox

    3. IF Checkbox IS NOT FILLED, clear the Date

    As a result, the Checkbox won't be clickable unless the Date Field is filled. Once the Date Field is filled out, the Checkbox can be ticked/checked. And once you tick it, it will clear the Date Field and will also automatically untick and disable itself.