How to conditionally clear a date field

  • Profile Image
    Deborah.Miller
    Asked on May 03, 2016 at 09: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.

  • Profile Image
    liyam
    Answered on May 03, 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

    Please do let us know if you have questions.

    Thanks.

  • Profile Image
    Deborah.Miller
    Answered on May 03, 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?

     

  • Profile Image
    liyam
    Answered on May 04, 2016 at 01: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.