Skip to content

Improve handling of choice fields with no choices in form templates #17579

Open
@backbone87

Description

@backbone87

Simple use-case: categories and products
When editing the product an expanded (multiple) choice field of categories is displayed.
However when you create a product before you have created any category, there is simply the label/legend of the choice and some empty containers.

There are multiple solutions i came up with:

  • Add a (configurable) "no choices available" message (my preferred solution)
  • Just output nothing for form_row and form_widget; form_label behaves normal

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