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

Already on GitHub? Sign in to your account

Dynamically created input fields do not have a name attribute #595

Closed
ghost opened this Issue Apr 26, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@ghost

ghost commented Apr 26, 2012

Chosen creates an extra input field for each affected select. These inputs are also included when submitting the form, and having no name attribute, they cause some systems to complain (and sometimes crash) when the query string suddenly looks like param1=xxx&param2=yyy&=&param3=zzz (note the single "=" with no name to its left).

It would be nice to add a dummy name parameter to these, to avoid this problem (tried it locally and it did the trick).

Contributor

pfiller commented Apr 26, 2012

I could see how that might be frustrating and adding a name wouldn't be a high-impact change. Would definitely support a pull request including this.

Contributor

pfiller commented Jul 26, 2013

A year later and this just hasn't presented itself as an issue often enough to pay attention to. A pull request would still warrant consideration, but I don't think this is a priority or an issue we should leave open.

@pfiller pfiller closed this Jul 26, 2013

Collaborator

stof commented Jul 26, 2013

Elements without a name attribute should not be submitted if your tool follows the HTML spec. And this is precisely what we expect here: submitting the chosen search field does not make sense.
It is a bug in your browser or your serialization library (if you do the submission in JS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment