Skip to main content

Bug Tracker

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 anonymous comment:1

Changed November 29, 2013 07:39PM UTC by bodyaga comment:2

it's not possible use input in form with name "elements"

Please, see example:

http://jsfiddle.net/KJLxA/

Changed December 02, 2013 03:56PM UTC by timmywil comment:3

resolution: → worksforme
status: newclosed

Changed December 02, 2013 04:12PM UTC by bodyaga 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 timmywil comment:5

resolution: worksforme
status: closedreopened

Sorry, I meant to close this cantfix.

Changed December 02, 2013 04:30PM UTC by timmywil comment:6

resolution: → duplicate
status: reopenedclosed

Duplicate of #13651.

Changed December 02, 2013 04:30PM UTC by timmywil comment:7

#14597 is a duplicate of this ticket.