Module: forms_js

Methods

(inner) createForm(defaultFields, prefix, forms) → {void}

Creates form fields
Parameters:
Name Type Description
defaultFields object object with elements to create and the default values
prefix string prefix for element ids
forms object cache for the form field containers
Source:
Returns:
Type
void

(inner) formToJson(prefix, settingsParams, defaultFields) → {boolean}

Populates the settings json from input elements
Parameters:
Name Type Description
prefix string for element ids
settingsParams object settings object to populate
defaultFields object settingsFields object
Source:
Returns:
true on success, else false
Type
boolean

(inner) jsonToForm(settingsFields, defaultFields, prefix) → {void}

Populates the form with values
Parameters:
Name Type Description
settingsFields object object with the values for the elements
defaultFields object object with elements to populate
prefix string prefix for element ids
Source:
Returns:
Type
void