Hello,
I have a form and when I want to set the primary key, I have an error 'Invalid' after the form's validation.
My widget :
$this->widgetSchema['nud'] = new sfWidgetFormInput();
And my validator :
'nud' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('nud')), 'empty_value' => $this->getObject()->get('nud'), 'required' => false)),
I have kept the validator generated by symfony but I have change the widget because symfony hase generated an inputHidden and the value which I want to enter isn't in the database.