diff --git a/form/create_custom_field_type.rst b/form/create_custom_field_type.rst index cc9ffe65df1..7f1df3731f1 100644 --- a/form/create_custom_field_type.rst +++ b/form/create_custom_field_type.rst @@ -405,7 +405,7 @@ libraries are used in your application: {# templates/form/custom_types.html.twig #} {% block postal_address_row %} - {% for child in form.children if not child.rendered %} + {% for child in form.children|filter(v => not v.rendered) -%}
{{ form_label(child) }} {{ form_widget(child) }}