I'm having problems in my register form. I have a choice field that is required to submit the form. In my form I have:
->add('playerPosition', 'choice', array(
'choices' => array('Spelverdeler' => 'Spelverdeler', 'Receptie/Hoek' => 'Receptie/Hoek', 'Libero' => 'Libero', 'Midden' => 'Midden', 'Opposite' => 'Opposite', 'All-round' => 'All-round'),
'label' => 'Spelerspositie*',
'empty_value' => 'Kies uw positie.',
'required' => true
))
And when the form shows the value 'Kies uw positie.' is selected. But when you submit I don't get an error that it's required. (Because a value 'Kies uw positie.' is selected, but that's just the empty value ..)
I'm also using chosen on my select list just like this:
$('#register_player_playerPosition').chosen();
So what can I do that it doesn't see the empty value as a value? I need to have a 'empty value' that is not a valid value... So the user is forced to pick a choice.