Skip to main content

Bug Tracker

Side navigation

#13330 closed feature (notabug)

Opened January 26, 2013 09:55PM UTC

Closed January 26, 2013 10:44PM UTC

Last modified January 26, 2013 11:01PM UTC

.serialize() doesn't include <output> fields from a form (new in HTML 5)

Reported by: White Glove Apps <jeremy@whitegloveapps.com> Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:
Description

With the addition of <output> fields for forms in HTML5, it would be beneficial to have .serialize() include them (perhaps optionally) when applied to a form. For example, the developer might want to collect usage data to improve the user experience, and collecting the <output> field values would be useful.

For an example, see http://jsfiddle.net/jemonat/9KJCb/. There, $('#myform').serialize() only includes input fields, not <output> fields.

Attachments (0)
Change History (2)

Changed January 26, 2013 10:44PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

See #10443. The updated link for the spec is

http://www.w3.org/TR/html5/forms.html#constructing-form-data-set

We're following spec here. The HTML5 spec doesn't consider <output> to be a submittable element, which does make sense because it's calculated, so we wouldn't want to include it. If you had a situation where you wanted to include it you can do it manually.

Changed January 26, 2013 11:01PM UTC by White Glove Apps <jeremy@whitegloveapps.com> comment:2

OK, thanks! I've included the output fields manually for my page; just thought it might be helpful to let developers decide if they want to include output fields in .serialize(). I understand the logic of following the HTML5 spec for what elements are submittable.