Conditional logic for spinner fields is not working correctly