Core Docs | Additional Modules Docs

sb.forms.serialize


@Description: Serializes a form input types including text, textarea, select, select-multiple, radio, checkbox
@File: forms/serialize.js
@Param: String form The name of the form to serialize
@Return: String The serialized form dat e.g.first_name=paul&day=monday
@Example:
<form method="post" action="index.php">
<input type="text" name="first_name" value="paul" />
<input type="text" name="last_name" value="visco" />
</form>

var data = sb.forms.serialize("#myForm");
//data = first_name=paul&last_name=visco