Skip to main content

Bug Tracker

Side navigation

#11138 closed bug (invalid)

Opened January 07, 2012 02:46AM UTC

Closed January 07, 2012 01:59PM UTC

Last modified March 14, 2012 10:17AM UTC

.serialize doesn't include submit buttons

Reported by: jquery@hotblocks.nl Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

It doesn't because it checks the type against rinput which is a static list of types. Which is very strange IMO.

Anyway: submit buttons with a name are part of the form value just as text inputs etc.

rinput

rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,

checked in serializeArray > filter

Attachments (0)
Change History (1)

Changed January 07, 2012 01:59PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

Button values are serialized only if a button press caused the form submit.

>If a form contains more than one submit button, only the activated submit button is successful. -- http://www.w3.org/TR/html4/interact/forms.html#h-17.13.2

When you serialize using code no button is pressed, and if a button press triggered the code you'll need to add it to the serialized input yourself.