Skip to content

Commit 0d387af

Browse files
peterrehmweaverryan
authored andcommitted
Fixed explanation of field options
1 parent dc2de60 commit 0d387af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reference/forms/types/options/empty_data.rst.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ choice is selected.
88

99
The true default value of this option depends on the field options:
1010

11-
* If ``required`` is ``true`` and ``data_class`` is set, then ``new $data_class()``;
12-
* If ``required`` is ``true`` and no ``data_class`` is set, then ``array()``;
13-
* If ``required`` is ``false``, then ``null``.
14-
11+
* If ``data_class`` is set and ``required`` is ``true``, then ``null``;
12+
* If ``data_class`` is set and ``required`` is ``false``, then ``new $data_class()``;
13+
* If ``data_class`` is not set and ``compound`` is ``true``, then ``array()``;
14+
* If ``data_class`` is not set and ``compound`` is ``false``, then ``null``.
1515

1616
But you can customize this to your needs. For example, if you want the ``gender`` field to be
1717
explicitly set to ``null`` when no value is selected, you can do it like this:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy