No description, website, or topics provided.
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
Makefile
README.md
jquery.serialize_form.coffee
jquery.serialize_form.js
jquery.serialize_form.min.js

README.md

$.serialize_form

After being fed up with how the default jQuery serialization worked, I wrote this little (257 bytes minified) plugin to get jQuery working in the format that I want. The largest feature is that it preserves correct formatting of items[] recurring form elements, and returns an object instead of an array.

Usage

HTML

<form id="my_form">
    <input name="category_name" value="My Category">
    <input name="post[]" value="1">
    <input name="post[]" value="2">
    <input name="post[]" value="3">
</form>

Coffee

console.log ($ '#my_form').serialize_form()

Result

The jsFiddle of this example can be seen here

License

This is released under the MIT License, which is in the LICENSE file.