Skip to content

Commit 7ee31a2

Browse files
committed
[Form][#1738] Tweaking more items in the form customizations
1 parent 65a9ff4 commit 7ee31a2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cookbook/form/form_customization.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ What are Form Themes?
8383
---------------------
8484

8585
Symfony uses form fragments - a small piece of a template that renders just
86-
one part of a form - to render every part of a form - - field labels, errors,
87-
``input`` text fields, ``select`` tags, etc
86+
one part of a form - to render each part of a form - field labels, errors,
87+
``input`` text fields, ``select`` tags, etc.
8888

8989
The fragments are defined as blocks in Twig and as template files in PHP.
9090

@@ -100,7 +100,7 @@ to render every part of a form.
100100
In the next section you will learn how to customize a theme by overriding
101101
some or all of its fragments.
102102

103-
For example, when the widget of a ``integer`` type field is rendered, an ``input``
103+
For example, when the widget of an ``integer`` type field is rendered, an ``input``
104104
``number`` field is generated
105105

106106
.. configuration-block::
@@ -119,15 +119,15 @@ renders:
119119

120120
<input type="number" id="form_age" name="form[age]" required="required" value="33" />
121121

122-
Internally, Symfony uses the ``integer_widget`` fragment to render the field.
122+
Internally, Symfony uses the ``integer_widget`` fragment to render the field.
123123
This is because the field type is ``integer`` and you're rendering its ``widget``
124124
(as opposed to its ``label`` or ``errors``).
125125

126126
In Twig that would default to the block ``integer_widget`` from the `form_div_layout.html.twig`_
127127
template.
128128

129-
In PHP it would rather be the ``integer_widget.html.php`` file located in ``FrameworkBundle/Resources/views/Form``
130-
folder.
129+
In PHP it would rather be the ``integer_widget.html.php`` file located in
130+
the ``FrameworkBundle/Resources/views/Form`` folder.
131131

132132
The default implementation of the ``integer_widget`` fragment looks like this:
133133

@@ -610,7 +610,7 @@ which part of the field is being customized. For example:
610610
<!-- src/Acme/DemoBundle/Resources/views/Form/_product_name_widget.html.php -->
611611

612612
<div class="text_widget">
613-
echo $view['form']->renderBlock('form_widget_simple') ?>
613+
echo $view['form']->block('form_widget_simple') ?>
614614
</div>
615615

616616
Here, the ``_product_name_widget`` fragment defines the template to use for the

0 commit comments

Comments
 (0)