Class: Form
Represents a form that is rendered in Viewer or edited in Builder.
Constructors
Constructor
new Form(
componentTree
,localization
,actions
,languages
,defaultLanguage
):Form
Creates a new instance of Form.
Parameters
componentTree
the root component of the form.
localization
the localization of the form.
actions
the form custom actions.
languages
Language
[]
the localization languages of the form.
defaultLanguage
the default localization language of the form.
Returns
Form
Properties
actions
readonly
actions:ActionValues
The set of action definitions.
componentTree
readonly
componentTree:ComponentData
Root component of the form.
defaultLanguage
defaultLanguage:
Language
Default localization language of the form.
errorProps
errorProps:
any
={}
Properties of the component displaying the error.
errorType?
optional
errorType:string
The type name of the component displaying the error.
formValidator?
optional
formValidator:string
The form validator.
languages
readonly
languages:Language
[] =[]
Localization languages of the form.
localization
readonly
localization:LocalizationStore
Localization of the form.
tooltipType?
optional
tooltipType:string
The type name of the component displaying the tooltip.
Accessors
actionNames
Get Signature
get actionNames():
string
[]
Returns
string
[]
the actions names array.
formValidatorFunction
Get Signature
get formValidatorFunction():
undefined
|FormValidator
Returns
undefined
| FormValidator
the form validator function.
Methods
cloneAction()
cloneAction(
namedAction
):void
Clones the action.
Parameters
namedAction
the named action to clone.
Returns
void
dispose()
dispose():
void
Disposes the form. Disposes all the components and localization.
Returns
void
initFields()
initFields():
void
Initializes form fields.
Returns
void
removeAction()
removeAction(
name
):void
Removes the action from the form.
Parameters
name
string
the action name to remove.
Returns
void
updateOrAddAction()
updateOrAddAction(
oldActionName
,newAction
):void
Changes the existing action to the new one, adds the action if the existing action is not found.
Parameters
oldActionName
string
the existing action name.
newAction
the new named action.
Returns
void