I've created a form field in a Symfony 4.2 Web Application based on an EntityType.
But i'm having some issues when editting the entry. The GUID ( i'm using this instead of an regular id ) isn't selected in the dropdown thats generated by an EntityType.
->add('fuel1', EntityType::class, [
'class' => Chemical::class,
'choice_label' => 'name',
'required' => false,
])
<option value="0e21313d-847e-4b8f-ab04-1cde3d0281e7">Chemical #1</option>
I expect the option to be selected. The value is correct in the DB, but it seems the data doesn't come through the EntityType.
** EDITTED, added some more code ****
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fuel_1;