Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input ID's not always unique when multiple forms are rendered #238

Open
njdancer opened this issue Jan 29, 2024 · 0 comments
Open

Input ID's not always unique when multiple forms are rendered #238

njdancer opened this issue Jan 29, 2024 · 0 comments

Comments

@njdancer
Copy link

The standard behaviour of form inputs is to reuse the field name as the input id. When multiple forms with colliding field names are present on the same page, these elements end up with identical id's. Aside from the fact that this makes the markup invalid, it also results in field labels that focus the wrong input when clicked.

This can currently be observed through the demo site on the multiple forms example here.

I would propose a new prop that can be given to a Form that is subsequently used to prefix any field id's(names should be fine as-is)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant