Skip to content

Commit 2ea9797

Browse files
committed
document the parent_form() Twig function
1 parent c03e4c0 commit 2ea9797

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

form/form_customization.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,18 @@ obvious (since it'll render the field for you).
312312
313313
{{ form_rest(form) }}
314314
315+
parent_form(form_view)
316+
......................
317+
318+
.. versionadded:: 4.3
319+
320+
The ``parent_form()`` function was introduced in Symfony 4.3.
321+
322+
Returns the parent form view or ``null`` if the form view already is the
323+
root form. Using this function should be preferred over accessing the parent
324+
form using ``form.parent``. The latter way will produce different results
325+
when a child form is named ``parent``.
326+
315327
Tests
316328
~~~~~
317329

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy