Conditions to hide fields are not executed when return to form after submitting