I have a dropdown field on a form that i have managed to link with an Entity, all options that are being displayed are pulled from database.
->add('project', 'entity', array(
'class' => 'AdminBundle:Programs',
'property' => 'name',
'placeholder' => 'Assigned Program'
When I save the form I can get the value from the dropdown to save in database. My problem is when i reopen the form to edit the user information the above dropdown field does not show the saved value as selected by default, where as the rest of the fields on a form are pre-filled with saved data.
Now I know i can use the 'data' => xyz
to set the default value but how do i do it in a case when the dropdown is linked with an Entity