File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -87,14 +87,16 @@ Adding an "empty value"
87
87
88
88
If you're using the non-expanded version of the type (i.e. a ``select `` tag)
89
89
element and you'd like to have a blank entry (e.g. "Choose an option") at
90
- the top of the select box, you can easily do so:
90
+ the top of the select box, you can easily do so by doing the following :
91
91
92
- * Set the ``multiple `` option to false
93
- * Set the ``required `` option to false
92
+ * Set the ``multiple `` option to false;
94
93
95
- With these two options, a blank choice will display at the top of the select
96
- box. To customize what that entry says, add the following when rendering
97
- the field:
94
+ * Set the ``required `` option to false or explicitly pass in the ``empty_value ``
95
+ option in the template (as shown below).
96
+
97
+ If ``required `` is true, a blank choice will display at the top of the select
98
+ box. To customize what that entry says (or if you have ``required `` set to
99
+ ``false ``), add the following when rendering the field:
98
100
99
101
.. configuration-block ::
100
102
You can’t perform that action at this time.
0 commit comments