public function setFormField($value)
    {
        if (is_array($value)) {
            if (is_null($this->formFieldClass)) {
                throw new Exception("DB Field incorrectly set up. What is the form class?");
            }
            if (is_null($this->_formField)) {
                $config = $value;
                $config['class'] = $this->formFieldClass;
                $config['modelField'] = $this;
                $value = Yii::createObject($config);
            } else {
                $settings = $value;
                $value = $this->_formField;
                unset($settings['class']);
                Yii::configure($value, $settings);
            }
        }

        $this->_formField = $value;

        return true;
    }