Skip to content

Commit 9e6ed08

Browse files
committed
Merge branch '4.2'
* 4.2: add form name caution to choice_name option Re-added a note about configuration imports Update create_custom_field_type.rst
2 parents 03fa56d + 8a10de0 commit 9e6ed08

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

configuration/configuration_organization.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ When the configuration values are dynamic, you can use the PHP configuration
124124
file to execute your own logic. In addition, you can define your own services
125125
to load configurations from databases or web services.
126126

127+
.. include:: /components/dependency_injection/_imports-parameters-note.rst.inc
128+
127129
Global Configuration Files
128130
~~~~~~~~~~~~~~~~~~~~~~~~~~
129131

form/create_custom_field_type.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ link for details), create a ``shipping_widget`` block to handle this:
150150
{% spaceless %}
151151
{% if expanded %}
152152
<ul {{ block('widget_container_attributes') }}>
153-
{% for child in form if not child.rendered %}
154-
<li>
155-
{{ form_widget(child) }}
156-
{{ form_label(child) }}
157-
</li>
158-
{% endfor %}
153+
{% for child in form if not child.rendered %}
154+
<li>
155+
{{ form_widget(child) }}
156+
{{ form_label(child) }}
157+
</li>
158+
{% endfor %}
159159
</ul>
160160
{% else %}
161161
{# let the choice widget render the select tag #}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ of the choice views in the template.
99
1010
This can be a callable or a property path. See `choice_label`_ for similar usage.
1111
If ``null`` is used, an incrementing integer is used as the name.
12+
13+
.. caution::
14+
15+
The configured value must be a valid form name. Make sure to only return
16+
valid names when using a callable. Valid form names must be composed of
17+
letters, digits, underscores, dashes and colons and must not start with
18+
a dash or a colon.

0 commit comments

Comments
 (0)