Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 283fbd0

Browse filesBrowse files
ilmoralitojaviereguiluz
authored andcommitted
Update forms.rst
For the purpose of making it easy to follow the guide, I think the definition of form should be maintained in this example
1 parent 541ab96 commit 283fbd0
Copy full SHA for 283fbd0

File tree

Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed

‎forms.rst

Copy file name to clipboardExpand all lines: forms.rst
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,14 +424,16 @@ Validation is a very powerful feature of Symfony and has its own
424424
.. code-block:: html+twig
425425

426426
{# app/Resources/views/default/new.html.twig #}
427-
{{ form(form, {'attr': {'novalidate': 'novalidate'}}) }}
427+
{{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }}
428+
{{ form_widget(form) }}
429+
{{ form_end(form) }}
428430

429431
.. code-block:: html+php
430432

431433
<!-- app/Resources/views/default/new.html.php -->
432-
<?php echo $view['form']->form($form, array(
433-
'attr' => array('novalidate' => 'novalidate'),
434-
)) ?>
434+
<?php echo $view['form']->start($form, array('attr' => array('novalidate' => 'novalidate') ?>
435+
<?php echo $view['form']->widget($form) ?>
436+
<?php echo $view['form']->end($form) ?>
435437

436438
.. index::
437439
single: Forms; Built-in field types

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.