Skip to content

Add Field Groups to DataForm #75916

@jameskoster

Description

@jameskoster

Proposal

Add a FieldGroup abstraction within DataForm that represents a meaningful grouping of related fields e.g. Address, or Credit card inputs.

This would map to semantic fieldset and legend elements in the markup, giving clearer structure and built-in accessibility.

FieldGroups can be visually separated from other fields using dividers or some other style technique.


Why

  • Aligns useful visual separation of fields with meaningful structure.
  • Adopts semantic HTML (fieldset / legend)
  • Scales better as forms grow in complexity

Open Questions

  • Should FieldGroup require a legend?
  • Do we allow visually hidden legends?
  • Do we need support for nested groups?
  • Would FieldGroup require any special rules for specific layout options (e.g. in row layout it may make sense for FieldGroup to always occupy a full row.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design SystemIssues related to the system of combining components according to best practices.Needs DesignNeeds design efforts.[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions