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 9916abf commit f84a1ebCopy full SHA for f84a1eb
reference/forms/types/entity.rst
@@ -202,9 +202,10 @@ query_builder
202
Allows you to create a custom query for your choices. See
203
:ref:`ref-form-entity-query-builder` for an example.
204
205
-The value of this option can either be a ``QueryBuilder`` object or a Closure.
+The value of this option can either be a ``QueryBuilder`` object, a Closure or ``null``.
206
When using a Closure, you will be passed the ``EntityRepository`` of the entity
207
-as the only argument and should return a ``QueryBuilder``.
+as the only argument and should return a ``QueryBuilder``.
208
+If you'd like to display a list of empty entries, you can return ``null`` in the closure.
209
210
Overridden Options
211
------------------
0 commit comments