8000 Use "children" property instead of "child" by liviubalan · Pull Request #9610 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Use "children" property instead of "child" #9610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ You can also apply a form theme to a specific child of your form:

.. code-block:: html+twig

{% form_theme form.child 'form/fields.html.twig' %}
{% form_theme form.children 'form/fields.html.twig' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the previous example was right in that it assumed that you would replace child with the name of the actual child form. Can we make that more clear with another example?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #9635


This is useful when you want to have a custom theme for a nested form that's
different than the one of your main form. Just specify both your themes:
Expand All @@ -346,7 +346,7 @@ different than the one of your main form. Just specify both your themes:

{% form_theme form 'form/fields.html.twig' %}

{% form_theme form.child 'form/fields_child.html.twig' %}
{% form_theme form.children 'form/fields_child.html.twig' %}

Form Theming in PHP
-------------------
Expand Down
0