Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8928 closed bug (invalid)

Form Serialize Not Including Elements Inside Tables

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.next
Component: ajax Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:



I'm using the jQuery library found at http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js and I just found a bug in the .serialize() function for forms.

One of the forms I have contains a table and that holds more input elements and when I tried to submit the form using the jQuery serialize function I get this:


I should be getting something like this:

oldPass=&newPass=&question=&answer=&username=YourTextHere&[email protected]…&phone=1234567890

The following block is my entire form.

Please let me know if and when there is a fix for this bug.

<form id="userInfo" name="user" method="post" action="" title="Change any of these values to update your user information">

<input type="hidden" value="" name="oldPass" /> <input type="hidden" value="" name="newPass" /> <input type="hidden" value="" name="question" /> <input type="hidden" value="" name="answer" />




<label for='username'>Username:</label>

</td> <td>

<input id='username' type="text" value="" />


</tr> <tr>


<label for='email'>Email Address:</label>

</td> <td>

<input id="email" type="email" value="" />


</tr> <tr>


<label for="phone">Phone Number:</label>

</td> <td>

<input id="phone" type="text" value="" />




<div style="text-align:center;">

<span id="user" style="color:red;font-weight:bold"></span><br /> <input type="submit" value="Submit" /> <input type="reset" value="Reset" />



Change History (4)

comment:1 Changed 12 years ago by Rick Waldron

Resolution: invalid
Status: newclosed

According to the API, you're doing it wrong. http://api.jquery.com/serialize/

serialize() requires a name attribute

comment:2 Changed 12 years ago by Rick Waldron

Component: unfiledajax

comment:3 Changed 12 years ago by [email protected]

The initial results were from the following command


comment:4 Changed 12 years ago by anonymous

Even when there are name attributes, it does not work with a table in form in IE.

Note: See TracTickets for help on using tickets.