8000 Simplified the form theming docs · symfony/symfony-docs@0a8a7ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a8a7ab

Browse files
committed
Simplified the form theming docs
1 parent 675bbce commit 0a8a7ab

File tree

13 files changed

+806
-1630
lines changed

13 files changed

+806
-1630
lines changed

_build/redirection_map

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,3 +403,5 @@
403403
/frontend/encore/installation-no-flex /frontend/encore/installation
404404
/http_cache/form_csrf_caching /security/csrf
405405
/console/logging /console
406+
/reference/forms/twig_reference /form/form_customization
407+
/form/rendering /form/form_customization

_images/form/form-field-parts.svg

Lines changed: 1 addition & 0 deletions
Loading
2 KB
Binary file not shown.

components/form.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ between Twig and several Symfony components:
177177
178178
$ composer require symfony/twig-bridge
179179
180-
The TwigBridge integration provides you with several :doc:`Twig Functions </reference/forms/twig_reference>`
181-
that help you render the HTML widget, label and error for each field
180+
The TwigBridge integration provides you with several
181+
:ref:`Twig Functions <reference-form-twig-functions-variables>`
182+
that help you render the HTML widget, label, help and error for each field
182183
(as well as a few other things). To configure the integration, you'll need
183184
to bootstrap or access Twig and add the :class:`Symfony\\Bridge\\Twig\\Extension\\FormExtension`::
184185

@@ -510,8 +511,8 @@ Rendering the Form
510511

511512
Now that the form has been created, the next step is to render it. This is
512513
done by passing a special form "view" object to your template (notice the
513-
``$form->createView()`` in the controller above) and using a set of form
514-
helper functions:
514+
``$form->createView()`` in the controller above) and using a set of
515+
:ref:`form helper functions <reference-form-twig-functions>`:
515516

516517
.. code-block:: html+twig
517518

@@ -528,7 +529,7 @@ That's it! By printing ``form_widget(form)``, each field in the form is
528529
rendered, along with a label and error message (if there is one). While this is
529530
convenient, it's not very flexible (yet). Usually, you'll want to render each
530531
form field individually so you can control how the form looks. You'll learn how
531-
to do that in the ":doc:`/form/rendering`" section.
532+
to do that in the :doc:`form customization </form/form_customization>" article.
532533

533534
Changing a Form's Method and Action
534535
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)
0