Constructor
new FormElement(schema, parametersopt)
Class constructor.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
schema |
object | Object defining the JSON Schema to be reflected by the form element. |
|||||||||||||||||||||||||||||||||||||||||
parameters |
object |
<optional> |
The form element construction parameters. Properties
|
- Source:
Members
content :module:components~Component
The content of the form element, complying the JSON Schema specifications.
Type:
- Source:
elementType :module:formElementDefinitions~ElementType
The type of the form element regarding the way it is created.
Type:
- Source:
formOptions :object
Object storing optional parameters for the form element construction.
Type:
- object
- Source:
inPlaceApplicationTree :module:inPlaceApplicators~IPASchema
The root node of a tree representation of the possible forms that the JSON Schema may possibly take considering its in-place applicators.
Type:
- Source:
keywords :object
The set of JSON Schema keywords that are currently represented by the form element.
Type:
- object
- Source:
layout :module:layouts~Layout
The layout object generating and keeping the DOM references to the form element representation.
Type:
- Source:
pointer :string
A JSON Pointer-like string that provides unique identification of the JSON Schema being represented by the form element.
Type:
- string
- Source:
propertyKey :string
The name of the property defined by the provided JSON Schema, only
regarded when the child applicator generating the form element is the
properties
applicator.
Type:
- string
- Source:
removeCallback :function
The function to be called if the form element is removed, only regarded
when the form element is of type ElementType.REMOVABLE
.
Type:
- function
- Source:
selectors :module:selectors~SelectorsContainer
The function to be called if the form element is removed, only regarded
when the form element is of type ElementType.REMOVABLE
.
Type:
- Source:
state :module:formElementDefinitions~State
The state of the form element at initialization.
Type:
- Source:
title :module:components~Component
The title component of the form element.
Type:
- Source:
titleIcon :module:components~Component
The title icon component of the form element.
Type:
- Source:
titleType :module:formElementDefinitions~TitleType
The type of the form element title.
Type:
- Source:
Methods
activate()
Activates the form element, allowing it to be either partially or fully interacted with respect to its current state.
- Source:
deactivate()
Deactivates the form element, disallowing any interaction.
- Source:
disable()
Disables the form element, disallowing any interaction other than its icon.
- Source:
enable()
Enables the form element, allowing it to be fully interacted.
- Source:
getInstance() → {any}
Retrieves the JSON instance expressed by the form element together with the inputted values.
- Source:
Returns:
The JSON instance associated to the form element.
- Type
- any
isEnabled() → {boolean}
Checks if the form element is enabled.
- Source:
Returns:
true
if the form element is enabled (that is, fully
interactive), false
otherwise.
- Type
- boolean
rebuild()
Rebuilds a form element after using the current in-place applicators selection.
- Source: