Reputation: 321
I have a select field (choiceType) in a form which is automatically filled (with all the line in another table).
I would like to set the label (only the label, not the content of the select)...
I managed to do that for a textType with changing :
$builder->add('note')
to
$builder->add('note', 'text', array('label' => 'myNewLabel')
but I can't do that with a choiceType because if I change
$buidler->add('column')
to
$builder->add('column', 'choice', array('label' => 'myNewLabel')
the select isn't filled...
Upvotes: 0
Views: 912
Reputation: 321
The solution is :
$builder->add('column', null, array('label' => 'myNewLabel')
Upvotes: 1