Bug Tracker

Modify

Ticket #12222 (closed bug: worksforme)

Opened 9 months ago

Last modified 9 months ago

.serializeArray() can't do array of same named elements

Reported by: mikk150@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

If I make form <form> <input type="checkbox" name="checkbox[]" checked="checked" value="1" /> <input type="checkbox" name="checkbox[]" checked="checked" value="2" /> <input type="checkbox" name="checkbox[]" checked="checked" value="3" /> </form>

then $('form').submit(function (){

console.log($(this).serializeArray())

})

gives only checkbox[]=3

but should give checkbox[0]=1 checkbox[1]=2 checkbox[2]=3

Change History

comment:1 Changed 9 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.