From e75a0a14d184a8385b635b00f437abb3bc50455b Mon Sep 17 00:00:00 2001 From: Mario Martinez Date: Tue, 27 Feb 2018 21:09:27 -0600 Subject: [PATCH] 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 --- forms.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/forms.rst b/forms.rst index c3b486a8071..198f7953b2e 100644 --- a/forms.rst +++ b/forms.rst @@ -434,7 +434,9 @@ Validation is a very powerful feature of Symfony and has its own .. code-block:: html+twig {# templates/default/new.html.twig #} - {{ form(form, {'attr': {'novalidate': 'novalidate'}}) }} + {{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }} + {{ form_widget(form) }} + {{ form_end(form) }} .. code-block:: html+php @@ -442,6 +444,9 @@ Validation is a very powerful feature of Symfony and has its own form($form, array( 'attr' => array('novalidate' => 'novalidate'), )) ?> + start($form, array('attr' => array('novalidate' => 'novalidate') ?> + widget($form) ?> + end($form) ?> .. index:: single: Forms; Built-in field types