Hide state field when not needed.