How to conditionally clear a date field

  • HRSSJotform
    Asked on May 3, 2016 at 9:07 PM

    Hi there, when a user selects "Use hard end date" for End date type and selects a date, if they change their mind and select "Use duration-based end date" the hard end date value stays, and vice versa.

    I can clear the duration based values, but I can't figure out how to update the date to "null" if they select duration-based.

  • liyam
    Replied on May 3, 2016 at 11:00 PM

    Hello,

    You can set your form to clear once the field is hidden by going to Preferences > Advanced Settings tab > Clear Hidden Field Values > select Clear on Being Hidden

    How to conditionally clear a date field Image 1 Screenshot 20

    Please do let us know if you have questions.

    Thanks.

  • HRSSJotform
    Replied on May 3, 2016 at 11:07 PM

    Thank you - I have other calculated fields. If I select that, does it clear all hidden fields or only upon the action of a field being hidden?

     

    How to conditionally clear a date field Image 1 Screenshot 20

  • liyam
    Replied on May 4, 2016 at 1:10 AM

    If you have a hidden field with a value, it will not be affected, since the action made by the function is to clear the field upon the moment it gets hidden, and not be cleared upon the loading of the form.

    However, to be sure, I would suggest to make tests as well after making the change to ensure that it will work as expected.

    Please do get back to us if you have further questions.

    Thanks.