-
-
Notifications
You must be signed in to change notification settings - Fork 680
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
Formidable does not parse multiple values on a select #104
Comments
If anyone else has this issue and it doesn't get fixed in a timely manner, here is my workaround (assuming you are using express / connect-form / formidable):
The properfields variable can then be used in form.parse / form.complete (depending if you're using vanilla formidable or formidable via connect-form with express. |
This is not a workaround, but the official API. I'll change it in 2.0 as most people find it annoying. Closing this as a dupe of #33 for now. |
@robinduckett thanks for the code, I was amazed that Formidable doesn't do this on its own. |
wow, this is ugly |
I have a select element
If all four are selected, in the fields variable of form.parse callback, I receive only
{'data[sites]': '4'}
. I believe this is because instead of adding identical field names into an array, formidable just adds it to an object, and as objects do not allow multiple properties of the same name, this case fails.This is somewhat annoying as express's bodyParser itself parses this correctly but formidable doesn't, and for some reason I can't read req.body if I'm using formidable within express.
Please advise.
The text was updated successfully, but these errors were encountered: