Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14594 closed bug (duplicate)

wrong data at form serialize

Reported by: bodyaga@… 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

Change History (7)

comment:2 Changed 6 years ago by bodyaga

it's not possible use input in form with name "elements" Please, see example: http://jsfiddle.net/KJLxA/

comment:3 Changed 6 years ago by timmywil

Resolution: worksforme
Status: newclosed

comment:4 Changed 6 years ago by bodyaga

in this example output data from .serialize must be

foo=foo&boo=boo&elements=bug

but, it's only

elements=bug

comment:5 Changed 6 years ago by timmywil

Resolution: worksforme
Status: closedreopened

Sorry, I meant to close this cantfix.

comment:6 Changed 6 years ago by timmywil

Resolution: duplicate
Status: reopenedclosed

Duplicate of #13651.

comment:7 Changed 6 years ago by timmywil

#14597 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.