how I can get value from form choice widget of submitted form?
Now it returns only integer index of selected option, but I need a value.
Below is my code:
$this->setWidget('emails',new sfWidgetFormChoice([
'label' => __('Emails'),
'expanded' => true,
'multiple' => true,
'choices' => ['email@gmail.com', 'email2@gmail.com'],
]));
$this->setValidators([
'emails' => new sfValidatorChoice(
['choices' => array_keys($this->getDefault('emails')), 'multiple' => true],
['required' => __('Required')]),