public function getValidField($id)
    {
        $objReturn = null;

        $objFields = $this->getFields();
        foreach ($objFields as $objField) {
            if ($objField->getId() == $id) {
                $objReturn = $objField;
                break;
            }
        }

        if (is_null($objReturn)) {
            foreach ($objFields as $objField) {
                if ($objField->getName() == $id) {
                    $objReturn = $objField;
                    break;
                }
            }
        }

        return $objReturn;
    }