-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): serializeObject, formdata, files
This PR implements an optimized version of the original jquery-serializeobject dependency of SUI when serializeForm:true was used. https://github.com/macek/jquery-serialize-object/blob/master/jquery.serialize-object.js I enhanced the original logic to also support file inputs, convert pure number values and support same name keys (without trailing []) I also added support to use The FormData Api when serializeForm is set to 'formdata'. This way the old code stays backward compatible.
- Loading branch information
Showing
1 changed file
with
68 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HI all, the override of the value at this line, ends up in an issue, when using arrays, e.g. Formdata looks like: "item[][name]=1" "item[][name]=2".
This will result in
{ "item": [
"name": 1
],
[
"name" : [ 1, 2 ]
]
}
The problem is that we