public function configure() { parent::configure(); $this->validatorSchema->setPostValidator(new sfValidatorPass()); if ($this->isNew()) { $this->setWidget('preset', new sfWidgetFormSelect(array('choices' => $this->getPresetChoiceList()))); $this->setValidator('preset', new sfValidatorChoice(array('choices' => array_keys($this->getPresetChoiceList())))); $this->widgetSchema->setLabel('preset', 'Preset'); $this->widgetSchema->moveField('preset', sfWidgetFormSchema::FIRST); } unset($this['name'], $this['form_type'], $this['value_type'], $this['is_unique'], $this['value_min'], $this['value_max'], $this['value_type'], $this['value_regexp']); $embeds = array_keys($this->getEmbeddedForms()); foreach ($embeds as $embed) { unset($this[$embed]); } }