Bug Tracker

Modify

Ticket #3588 (closed feature: invalid)

Opened 5 years ago

Last modified 14 months ago

Allow sub-section of form to be serialized

Reported by: pbowyer Owned by:
Priority: major Milestone: 1.3
Component: ajax Version: 1.2.6
Keywords: Cc: pbowyer, flesler
Blocking: Blocked by:

Description

Often I need to do partial form submissions (for inline AJAX lookups). The built-in serialize() and serializeArray() methods will only work when applied to the <form> itself, and not to sub-sections of the form.

Adding this behaviour would be great and mean I don't have to roll my own serialization code!

Attachments

test.html Download (1.4 KB) - added by pbowyer 5 years ago.
Demonstration file, showing how serialization doesn't work

Change History

Changed 5 years ago by pbowyer

Demonstration file, showing how serialization doesn't work

comment:1 Changed 5 years ago by flesler

  • Cc pbowyer, flesler added
  • Status changed from new to closed
  • Resolution set to invalid
  • Type changed from bug to feature

serialize does accept single elements.

$('form *').filter('.foo').serialize()

comment:2 Changed 14 months ago by anonymous

I have come across this, especially with steps forms any one fixed this yet?

comment:3 Changed 14 months ago by dmethvin

As the comment above says, just serialize whichever elements you'd like.

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.