class SAPO.Utility.FormSerialize
Authors:
jose.p.dias AT co.sapo.pt
Version:
0.1
 Supports form data to/from JSON serialization.
 Valid applications are ad hoc AJAX/syndicated submission of forms, restoring form values from server side state, etc.
 
Since:
June 2011
Defined in Utility/FormSerialize/0.1/lib.js

Function Summary
fillIn (DomElement|String form, Object map2)
sets form elements with values given from object One cannot restore the values of an input of type file (browser prohibits it)
Object serialize (DomElement|String form)
returns a map of fieldName -> String|String[]|Boolean (only select multiple and checkboxes with multiple values return arrays)

Function Details

function fillIn

fillIn(DomElement|String form, Object map2)
sets form elements with values given from object One cannot restore the values of an input of type file (browser prohibits it)
Parameters:
form - form element which is to be populated
map2 - map of fieldName -> String|String[]|Boolean

function serialize

Object serialize(DomElement|String form)
returns a map of fieldName -> String|String[]|Boolean (only select multiple and checkboxes with multiple values return arrays)
Parameters:
form - form element from which the extraction is to occur