spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Feat]: Form Association for inputs

Open damooo opened this issue 1 year ago • 2 comments
trafficstars

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Impacted component(s)

Input elements

Description of the requested feature

I cannot use textfield inside form element as native one. FormAssociatedCustomElements provide an api to properly integrate into forms.

Mockups or screenshots

No response

Implementation notes or ideas

No response

damooo avatar Jan 14 '24 18:01 damooo

Can i create a PR for textfield for this? Without form association, many things like formdata collection on submit, validation, reset, etc seems unconcievable. And workaround patterns are not documented. So I hope this to be addressed.

damooo avatar Jan 16 '24 16:01 damooo

We be happy to take a look at one. We'd likely not be able to make a release with this feature until all of our Form Elements supported it to allow for uniformity across the library, but the first step is the hardest!

Related, we'd need to be sure to gate this feature on browser support to prevent its use from causing trouble in browsers that do not currently ship this API.

Westbrook avatar Jan 16 '24 17:01 Westbrook