js fix for showing/hiding form fields