Skip to content

Use custom data field instead of id #2529

@sdirix

Description

@sdirix

Is your feature request related to a problem? Please describe.

At the moment we generate a unique global id per control based on its UI Schema path.
It must be unique because we assign it to the id HTML field which should be unique over the document.

However this brings with it some issues, see for example

Describe the solution you'd like

There is no actual need for us to use the id field for this information. Instead we should just use a data HTML field without making the paths unique.

The data field could still be used for CSS, programmatic access etc. To make them unique, users then should prefix their forms, e.g. setting a different attribute on each of them.

Describe alternatives you've considered

Keep the current state but improve the id handling regarding performance, lifetime etc.

Package

Core

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions