remix-forms
remix-forms copied to clipboard
Input ID's not always unique when multiple forms are rendered
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)