Skip to content

[Form] Views of compound forms without children are not considered rendered #17580

Closed
@backbone87

Description

@backbone87

Well the title says it all.

{{ form_start(form) }}
  {{ form_errors(form) }}
  {% for subForm in form.components %}
    {{ form_row(subForm) }}
  {% else %}
    no components
  {% endif %}
{{ form_end(form) }}

If form.components is empty, it is not considered as rendered at the time form_end is called, causing its "container" markup to be rendered. This is especially annoying when you have expanded choices with an empty array of choices.

This is partly related to: #17579

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions