diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 51360ed3c96..255c1248566 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -202,9 +202,10 @@ query_builder Allows you to create a custom query for your choices. See :ref:`ref-form-entity-query-builder` for an example. -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``. When using a Closure, you will be passed the ``EntityRepository`` of the entity -as the only argument and should return a ``QueryBuilder``. +as the only argument and should return a ``QueryBuilder``. +If you'd like to display a list of empty entries, you can return ``null`` in the closure. Overridden Options ------------------
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: