Skip to content

Commit 5a4a8fc

Browse files
committed
minor #11018 Improved the explanation of the block_name form option (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Improved the explanation of the block_name form option Fixes #4330. Commits ------- baf24e0 Improved the explanation of the block_name form option
2 parents d5706e4 + baf24e0 commit 5a4a8fc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ block_name
44
**type**: ``string`` **default**: the form's name (see :ref:`Knowing which
55
block to customize <form-customization-sidebar>`)
66
7-
Allows you to override the block name used to render the form type.
8-
Useful for example if you have multiple instances of the same form and you
9-
need to personalize the rendering of the forms individually.
7+
Allows you to add a custom block name to the ones used by default to render the
8+
form type. Useful for example if you have multiple instances of the same form
9+
and you need to personalize the rendering of the forms individually.
10+
11+
If you set for example this option to ``my_custom_name`` and the field is of
12+
type ``text``, Symfony will use the following names (and in this order) to find
13+
the block used to render the widget of the field: ``_my_custom_name_widget``,
14+
``text_widget`` and ``form_widget``.

0 commit comments

Comments
 (0)