Skip to content

allow option to return un-serialized form content from fieldSerialize() #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions jquery.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ $.fn.formSerialize = function(semantic) {
* Serializes all field elements in the jQuery object into a query string.
* This method will return a string in the format: name1=value1&name2=value2
*/
$.fn.fieldSerialize = function(successful) {
$.fn.fieldSerializeArray = function(successful) {
var a = [];
this.each(function() {
var n = this.name;
Expand All @@ -917,7 +917,11 @@ $.fn.fieldSerialize = function(successful) {
}
});
//hand off to jQuery.param for proper encoding
return $.param(a);
return a;
};

$.fn.fieldSerialize = function(successful) {
return $.param(this.fieldSerializeArray(successful));
};

/**
Expand Down