Conditional logic and hidden fields not working