Skip to content

Commit 34d0be4

Browse files
sebastianblumweaverryan
authored andcommitted
added configuration block
I added no semicolon at the end of the PHP echo because in all other examples there exists no semicolon
1 parent efb88eb commit 34d0be4

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

book/forms.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -420,18 +420,21 @@ corresponding errors printed out with the form.
420420
but are being prevented by your browser from, for example, submitting
421421
blank fields.
422422

423-
.. code-block:: html+jinja
424-
425-
{# src/Acme/DemoBundle/Resources/views/Default/new.html.twig #}
426-
427-
{{ form(form, {'attr': {'novalidate': 'novalidate'}}) }}
428-
429-
.. code-block:: html+php
430-
<!-- src/Acme/DemoBundle/Resources/views/Default/new.html.php -->
431-
432-
<?php echo $view['form']->form($form, array(
433-
'attr' => array('novalidate' => 'novalidate'),
434-
)) ?>
423+
.. configuration-block::
424+
425+
.. code-block:: html+jinja
426+
427+
{# src/Acme/DemoBundle/Resources/views/Default/new.html.twig #}
428+
429+
{{ form(form, {'attr': {'novalidate': 'novalidate'}}) }}
430+
431+
.. code-block:: html+php
432+
433+
<!-- src/Acme/DemoBundle/Resources/views/Default/new.html.php -->
434+
435+
<?php echo $view['form']->form($form, array(
436+
'attr' => array('novalidate' => 'novalidate'),
437+
)) ?>
435438

436439
Validation is a very powerful feature of Symfony2 and has its own
437440
:doc:`dedicated chapter </book/validation>`.

0 commit comments

Comments
 (0)