Form

App.form. Form

new Form(input)

See:
  • App.form for creating forms in different modes

Creates instance of App.form

Parameters:
Name Type Description
input object

configuration parameters for the form.

Methods

destroy()

Destroy's this form instance including event listeners.

getAllFieldInstances() → {Object}

Returns all field instances from a form

Returns:

field instances associated with this form

Type
Object

getFieldInstanceByDataIdentifier(dataIdentifier, invertFieldNameMapping) → {*}

Parameters:
Name Type Default Description
dataIdentifier
invertFieldNameMapping true
Returns:
Type
*

getInputElementByDataIdentifer(dataIdentifier) → {*}

Parameters:
Name Type Description
dataIdentifier
Returns:
Type
*

getObjectId() → {String}

Returns:

objectId The objectId associated with this form

Type
String

setFieldRequired(field, requiredopt)

Set Alpaca form field mandatory

Parameters:
Name Type Attributes Default Description
field Object

Alpaca form field

required boolean <optional>
true

indicates if the field should be required, i.e. mandatory

toggleEditMode(e)

Toggle the form between 'EDIT' and 'VIEW' mode

Parameters:
Name Type Description
e Event

An optional event that fired the toggle action.

updateValueByDataIdentifier(label, value, dataIdentifier)

Updates the value of the form with the given dataIdentifier. Note other widgets with the same dataIdentifier will be updated as well.

Parameters:
Name Type Description
label
value
dataIdentifier