Skip to content

Fieldset primitive for grouping FormFields under one label — confirm interest before scoping #463

Description

@IgorShevchik

What

Split out of #48, which raised this and explicitly asked for a decision before anyone scoped it:

A separate, distinct gap (not this issue): there is no built-in "titled, bordered field-group / fieldset" primitive for grouping several FormFields under one labeled box (the "Client" sub-section pattern). If we want that, it should be its own issue/PR for a B24FieldGroup-style fieldset variant — please confirm interest before scoping.

#48 has been closed by #461, which documented the #label slot it asked about. This carries the unanswered half forward so it does not disappear with that issue.

The question, not the proposal

Record-edit and CRM forms group fields under a heading — "Client", "Delivery", "Payment" — usually in a bordered box. Today that is assembled by hand from a Card or plain markup plus several FormFields. The question is whether that arrangement deserves a component.

Worth noting before anyone builds it:

  • B24FieldGroup already exists and means something else — it groups controls into a single visual unit (an input with an attached button), via useFieldGroup. A fieldset primitive would need a different name, or the existing one would need a variant that does not muddle the two.
  • The semantic element is <fieldset>/<legend>, which brings real accessibility behaviour — the legend joins each control's accessible name, and disabled cascades to every control inside. That is a feature, but it means the component is not just a bordered box, and <legend> styling is notoriously constrained.
  • Upstream nuxt/ui has no equivalent, so this would be a b24ui-only surface and a permanent divergence to carry through ports — a .sync/PORTING.md entry, per this repo's convention.

What would settle it

A yes/no from the maintainer, and if yes, a look at two or three real Bitrix24 forms to see whether the grouping is genuinely repetitive or whether a Card with a heading is already the right answer.

Not proposing an API here — per the original request, interest first.

Context

Raised in #48, carried forward when that issue was closed by #461.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions