How to clear conditionally hidden fields?