Side navigation
#14594 closed bug (duplicate)
Opened November 29, 2013 07:00PM UTC
Closed December 02, 2013 04:30PM UTC
Last modified December 02, 2013 04:30PM UTC
wrong data at form serialize
Reported by: | bodyaga@mail.ru | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
it's not possible use input's in form with name "elements"
Please, see example:
<form id="form">
<input name="foo" value="foo">
<input name="boo" value="boo">
<input name="elements" value="bug">
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>
var $form = $('#form');
console.log($form.serializeArray());
console.log($form.serialize());
</script>
// Output:
Array[1]
0: Object
name: "elements"
value: "bug"
__proto__: Object
length: 1
__proto__: Array[0]
test.html:9
elements=bug
Attachments (0)
Change History (7)
Changed November 29, 2013 07:04PM UTC by comment:1
Changed November 29, 2013 07:39PM UTC by comment:2
it's not possible use input in form with name "elements"
Please, see example:
Changed December 02, 2013 03:56PM UTC by comment:3
resolution: | → worksforme |
---|---|
status: | new → closed |
Changed December 02, 2013 04:12PM UTC by comment:4
in this example output data from .serialize must be
foo=foo&boo=boo&elements=bug
but, it's only
elements=bug
Changed December 02, 2013 04:30PM UTC by comment:5
resolution: | worksforme |
---|---|
status: | closed → reopened |
Sorry, I meant to close this cantfix.
http://jsfiddle.net/KJLxA/