Skip to content

Instantly share code, notes, and snippets.

@mattsawyer77
mattsawyer77 / jquery.unserialize-form.js
Created November 17, 2011 18:08 — forked from paulirish/gist:854293
jQuery unserialize Form plugin
// Unserialize (to) form plugin - by Christopher Thielen
// adapted and desuckified (a little) by Paul Irish
// Matt Sawyer changed serialized_values array to an object and handled url-encoding for keys and values
// takes a GET-serialized string, e.g. first=5&second=3&a=b and sets input tags (e.g. input name="first") to their values (e.g. 5)
(function($) {
$.fn.unserializeForm = function(values) {