Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0a8a7ab

Browse files
committed
Simplified the form theming docs
1 parent675bbce commit0a8a7ab

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:`formhelper 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)

[8]ページ先頭

©2009-2025 Movatter.jp