class
SAPO.Utility.FormSerialize
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:
Defined in
Utility/FormSerialize/0.1/lib.js
June 2011
Function Summary
sets form elements with values given from object
One cannot restore the values of an input of type file (browser prohibits it)
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