This package has been deprecated
Author message:
Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
form-params
2.1.1 • Public • Published FormParams
jQuery plugin to GET or SET form fields to/from JS object.
Installation
bower install form-params
Basic usage
<form id="testForm">
<input name="name" placeholder="name" value="tom"/>
<input name="surname" placeholder="surname" value="B"/>
<input type="checkbox" name="optin" />Opt-In<br>
<input type="radio" name="gender" value="m" />M <input type="radio" name="gender" value="f" />F<br>
<input name="address[line1]" placeholder="address line 1" value=""/>
<input name="address[line2]" placeholder="address line 2" value=""/>
<input name="address[line3]" placeholder="address line 3" value=""/>
</form>
$(function(){
var formObj = $('#testForm').formParams();
var formObj = $('#testForm').formParams(true);
$('#testForm').formParams(formObj);
$('#testForm').formParams(formObj, true);
});
Demo included (just open index.html)
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads