react-select icon indicating copy to clipboard operation
react-select copied to clipboard

"form" attribute in Select doesn't work with FormData

Open Reflex-Gravity opened this issue 3 years ago • 3 comments

I have a Select field outside the form tag. So, I have set form prop to Select, But when I'm trying to access the Select field via FormData it doesn't consider the Select field at all.

Below is the live link with issue RP: https://codesandbox.io/s/hardcore-chatterjee-2kbxys

Reflex-Gravity avatar May 24 '22 15:05 Reflex-Gravity

I played around with your sandbox and tried adding form="formList" in the hidden input resolves it image

To the maintainers of this project, let me know if this is the right way to solve this?

idiglove avatar Jun 28 '22 03:06 idiglove

Hey, I found an approach...hope you will find it useful. below i' attaching the link that I have tried. https://codesandbox.io/s/black-butterfly-f0lsrr?file=/src/App.js

suzy-g38 avatar Jul 21 '22 17:07 suzy-g38

This definitely seems like a bug to me and is still present in the current version 5.9.0. With the form attribute absent from the actual hidden input element that contains the name and value, it nullifies the native functionality of the form attribute preventing it from being sent when that specific form is submitted.

schizek avatar Dec 29 '24 15:12 schizek