Skip to content

Instantly share code, notes, and snippets.

@rileyrg
Created September 24, 2017 17:45
Show Gist options
  • Save rileyrg/6f8d909b0157cdf4438cc86caa439f45 to your computer and use it in GitHub Desktop.
Save rileyrg/6f8d909b0157cdf4438cc86caa439f45 to your computer and use it in GitHub Desktop.
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper->add('firstName', 'text');
$formMapper->add('surname', 'text');
$formMapper->add(
'sex',
'choice',
array('choices' => [
"person.sex0" => 0,
"person.sex1" => 1,
"person.sex2" => 2,
],
'expanded' => true,
'translation_domain' => 'person',
'label'=>'person.sex'
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment