Class: forbject

forbject

new forbject(formRef)

A module that represents a forbject object, a componentTab is a page composition tool.

Parameters:
Name Type Description
formRef object

element selector of form element or actual form element

Author:
  • Yaw Joseph Etse
License:
  • MIT
Source:

Requires

  • module:events
  • module:util

Methods

_getObject() → {object}

returns form object

Source:
Returns:

form object

Type
object

_refresh() → {object}

refresh form object key/value pair mapping

Source:
Fires:
  • event:refresh
Returns:

form object

Type
object

addChild(result, domNode, keys, value)

Recursive method that adds keys and values of the corresponding fields.

Parameters:
Name Type Description
result object

form object

domNode object

element in form object

keys string

regex result of form elements

value object

value of domNode

Source:

forEach(arr, callback)

Iteration through arrays and objects. Compatible with IE.

Parameters:
Name Type Description
arr Array

array to iterate through

callback function

async callback

Source:

isDomNode(node) → {Boolean}

Check to see if the object is a HTML node.

Parameters:
Name Type Description
node object

dom element

Source:
Returns:

if object is a dom node

Type
Boolean

setForm() → {object}

Set the main form object we are working on.

Source:
Returns:

Form Element Object

Type
object

setFormElements() → {number}

Set the elements we need to parse.

Source:
Returns:

number of form elements

Type
number

setFormObj()

iterate through form element items and append enabled elements to form object

Source: