From baf24e05b73b0dbfbf4d856aab6a982ba7b932e7 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 20 Feb 2019 10:30:47 +0100 Subject: [PATCH] Improved the explanation of the block_name form option --- reference/forms/types/options/block_name.rst.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/reference/forms/types/options/block_name.rst.inc b/reference/forms/types/options/block_name.rst.inc index 7d040ce85ed..f873c1014ad 100644 --- a/reference/forms/types/options/block_name.rst.inc +++ b/reference/forms/types/options/block_name.rst.inc @@ -4,6 +4,11 @@ block_name **type**: ``string`` **default**: the form's name (see :ref:`Knowing which block to customize `) -Allows you to override the block name used to render the form type. -Useful for example if you have multiple instances of the same form and you -need to personalize the rendering of the forms individually. +Allows you to add a custom block name to the ones used by default to render the +form type. Useful for example if you have multiple instances of the same form +and you need to personalize the rendering of the forms individually. + +If you set for example this option to ``my_custom_name`` and the field is of +type ``text``, Symfony will use the following names (and in this order) to find +the block used to render the widget of the field: ``_my_custom_name_widget``, +``text_widget`` and ``form_widget``.