We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01a7602 commit 9c0a86dCopy full SHA for 9c0a86d
reference/forms/types/entity.rst
@@ -39,11 +39,14 @@ be listed inside the choice field::
39
40
$builder->add('users', 'entity', array(
41
'class' => 'AcmeHelloBundle:User',
42
+ 'property' => 'username',
43
));
44
45
In this case, all ``User`` objects will be loaded from the database and rendered
46
as either a ``select`` tag, a set or radio buttons or a series of checkboxes
47
(this depends on the ``multiple`` and ``expanded`` values).
48
+If the entity object does not have a ``__toString()`` method the ``property`` option
49
+is needed.
50
51
Using a Custom Query for the Entities
52
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments