How to clear conditionally hidden fields on submit?