I use Symfony 3.0.4. I wish replace the value to increment by my label. I referred to the official documentation unsuccessfully. I also tried choices_as_values unsuccessfully too :(
This is a piece of my buildForm() function :
->add(
'fieldName',
ChoiceType::class,
array(
'choices' => array(
'Yes' => true,
'No' => true,
'Maybe' => true,
),
'choice_value' => function ($choice) {
return $choice;
},
)
)
And I have a return error 500 :
Notice: Array to string conversion
Do you have any idea? Thanks a lot