AVIL13


Demo of jQuery plugin Form_data

GitHub repository


        

How to use?

It's simple.
Connect this plugin to your page:

            <script src="/path/to/form_data.js"></script>
        

And get form data:

            var data = $("#form").formData();
        

This plugin has three options.
select_attr - where the name attribute is taken.
Default: 'name'

textvalue - boolean attribute. It's used to get value from select.
If 'false' then get option value. If 'true' then get option text.
Default: 'false';

callback - callback function, get completed object
Default: 'false';

var data = $("#form").formData({
                select_attr: "name",
                textvalue: false,
                callback: false
            }); 

P.S.:
This is very simple plugin, but it's very helpful for me.