new GuideTextBox()
JavaScript class to represent the adaptive forms TextBox Component. Instantiation of the Class is not permitted and doing so will throw a runtime exception
- Since:
-
- 6.0
Extends
Members
-
title :boolean
caption of the Field
-
Returns the caption of the Field. Since 6.1 FP1 the caption can be modified using this API.
Type:
- boolean
- Since:
-
- 6.0
- Inherited From:
-
value :string|number
value of the Field.
-
The value is either filled by the user, or set explicitly using the expressions
The type is one of the JavaScript primitive type (string, number) based on the type of the Field For example, the value of a NumericField is number. For TextField it is a string. For DateFields the value type is ISO Date String (YYYY-MM-DD)
Empty values are treated as null.
Type:
- string | number
- Since:
-
- 6.0
- Inherited From:
-
<readonly> formattedValue :string
formatted value of the field object
-
The value is formatted based on the display format provided in the dialog
Type:
- string
- Since:
-
- 6.0
- Inherited From:
-
<readonly> displayPictureClause :string
Display Format provided in the dialog (if any)
-
Type:
- string
- Since:
-
- 6.0
- Inherited From:
-
<readonly> validatePictureClause :string
Validate Format provided in the dialog (if any)
-
Type:
- string
- Since:
-
- 6.0
- Inherited From:
-
mandatory :boolean
Specifies whether the field is required or not.
-
The property can be set through the Field Dialog or at runtime
If the property is set to true, then user won't be able to submit the form if value property is null
This API is configurable in script since 6.1
Type:
- boolean
- Since:
-
- 6.0
- Inherited From:
-
<readonly> mandatoryMessage :string
Error message to display if mandatory validation fails
-
The message is displayed to the user when the mandatory validations are run and they return false
Type:
- string
- Since:
-
- 6.0
- Inherited From:
- See:
-
<readonly> validateExpMessage :string
Error message to display if script validation fails
-
The message is displayed to the user when the script validations are run and they return false
Type:
- string
- Since:
-
- 6.0
- Inherited From:
- See:
-
<readonly> validatePictureClauseMessage :string
Error message to display if pattern validation fails
-
The message is displayed to the user when the pattern validations are run and they return false
Type:
- string
- Since:
-
- 6.0
- Inherited From:
- See:
-
<readonly> validationState :boolean
whether the Field is valid or not
-
If the validate API returns true, then the Field is valid otherwise not. Returns false if the Field is invalid otherwise true
Type:
- boolean
- Since:
-
- 6.0
- Inherited From:
- See:
-
<readonly> width :number
width specified in the Dialog
-
Type:
- number
- Since:
-
- 6.0
- Inherited From:
-
<readonly> height :number
height specified in the Dialog
-
Type:
- number
- Since:
-
- 6.0
- Inherited From:
-
<readonly, nullable> cssClassName :string
CSS Classes added in the Field Edit Dialog
-
Type:
- string
- Since:
-
- 6.0
- Inherited From:
-
<readonly, nullable> shortDescription :String
The short description defined in the Scriptable object.
-
In AF, one can define short Description for the Fields. This API returns the short Description set on the Field. It is non null only for Field objects
Type:
- String
- Since:
-
- 6.0
- Inherited From:
-
<readonly, nullable> longDescription :String
Specifies the long description present in the Scriptable object
-
In AF, one can define long Description for the Objects. This API returns the long Description set on the Objects.
Type:
- String
- Since:
-
- 6.0
- Inherited From:
-
visible :boolean
Visiblity of the Node. True if it's visible otherwise false.
-
Type:
- boolean
- Since:
-
- 6.0
- Inherited From:
- See:
-
enabled :boolean
Specify whether the component is enabled or not.
-
Type:
- boolean
- Since:
-
- 6.0
- Inherited From:
- See:
-
<readonly, non-null> name :string
Name of the node
-
Type:
- string
- Since:
-
- 6.0
- Inherited From:
-
<readonly, non-null> somExpression :string
SOM Expression of the Node.
-
In Adaptive Forms SOM is a model to access fields and Panels. The SOM Expression provides easy access to the Fields and Objects through a straightforward syntax
Type:
- string
- Since:
-
- 6.0
- Inherited From:
Example
Considering the heirarchy, -- guide -- panel1 ---- field2 ---- panel2 ------ field3 the som Expression of field3 will be guide[0].panel1[0].panel2[0].field3[0]. The 0 here represents the same name sibling index of that particular item in its parent. If panel2 has an additional child field3 as ---- panel2 ------- field3 ------- field3 The second field3 would have the somExpression guide[0].panel1[0].panel2[0].field3[1]
-
<readonly, nullable> nonLocalizedTitle :string
Non Localized Title of the element.
-
Type:
- string
- Since:
-
- 6.0
- Inherited From:
-
<readonly, non-null> panel :Panel
Parent panel in which the Node is inserted
-
Type:
- Since:
-
- 6.0
- Inherited From:
-
<readonly, non-null> index :number
Index of the Node among its siblings having the same name as itself
-
Every node in the Adaptive Form field has an index depending on the number of same named siblings that the node has before it. If the element has no same named sibling its index will always be 0.
Type:
- number
- Since:
-
- 6.0
- Inherited From:
-
<nullable> placeholderText :string
Placeholder text set in the Field
-
Type:
- string
- Since:
-
- 6.1
- Inherited From:
-
<readonly> editPictureClause :string
Edit Format provided in the dialog (if any)
-
Type:
- string
- Since:
-
- 6.1
- Inherited From:
-
<readonly> isGlobal :boolean
whether the field is marked as Global
-
Returns true for Fields that are marked as Global Fields, false otherwise
Type:
- boolean
- Since:
-
- 6.1 FP1
- Inherited From:
-
dorExclusion :boolean
Whether the object is excluded from DOR or not
-
The property specifies the exclusion of the field from document of record. If the value is true, then the field is excluded otherwise included in DoR. If excludeFromDoRIfHidden property is set at guide container, the value of dorExclusion is derived from visibility of field dynamically.
Type:
- boolean
- Since:
-
- 6.1-FP1
- Inherited From:
-
<readonly> bindRef :String
Binding specified for the object
-
In AF, components can be bound to XML Schema or XFA elements. This API returns that binding. In case of XFA elements, it returns the SOM Expression of that element otherwise the XPATH of the element.
Type:
- String
- Since:
-
- 6.2
- Inherited From:
-
<readonly> isXsd :boolean
Whether the element is bound to XSD element or not
-
In AF, components can be bound to Schema(XML/JSON) or XFA elements. This API returns true if the component is bound to XML Schema false otherwise
Type:
- boolean
- Since:
-
- 6.2
- Inherited From:
-
<readonly> multiLine :boolean
-
Specifies whether multiple lines can be entered in the textbox. If the value is true then user can add multiple lines otherwise not
Type:
- boolean
- Since:
-
- 6.0
-
<readonly> maxChars :Number
-
Specifies the maximum characters that can be entered in the text box
Type:
- Number
- Since:
-
- 6.0
-
<readonly> minLength :Number
-
Specifies the minimum number of characters that should be entered in the text box
Type:
- Number
- Since:
-
- 6.3
-
<readonly> length :Number
-
Specifies the exact number of characters that should be entered in the text box
Type:
- Number
- Since:
-
- 6.3
-
<readonly> allowRichText :boolean
-
Specifies whether rich Text is allowed in the text box
Type:
- boolean
- Since:
-
- 6.3
-
stateOverrides :map
overridden state of object
-
The property specifies overridden state in field
Type:
- map
- Since:
-
- 6.5
- Inherited From:
Methods
-
validate(errorList)
Validate the Field and return the result of those validations.
-
In Adaptive Form Fields can have three types of validations
- Mandatory (Field is required)
- Pattern Validation (value entered must match a pattern)
- Script Validation (custom scripts that return a boolean value)
This API executes all three types of validation in this order and if any of it fails, it returns false. If all the three pass, then it returns true.
The failure rules for these validations are defined as
- Mandatory validations fail if the Field is mandatory and its value is null.
- Script Validations fail if a validate Expression is defined and the return value of the expression is not true.
- Pattern Validations fail if the field has a validate Pattern and value entered doesn't match that pattern.
These validations are run automatically in the following two cases
- when the value of this field is changed or
- user submits the Form
Parameters:
Name Type Description errorList
Array.<Field~ValidationError> The array will be filled with the ValidationError object if the validations on the field fail.
- Since:
-
- 6.0
- Inherited From:
Returns:
true if all the validations in the Field passes, false otherwise
- Type
- boolean
-
isEmpty()
Whether the Field is empty or not
-
Returns true if the value of the Field is null or empty string
""
- Since:
-
- 6.0
- Inherited From:
Returns:
true if the value is null or empty string, false otherwise
- Type
- boolean
-
resetData()
reset the value of the Field
-
This API resets the value (if any) of the Field. The value is reset to the default value set in the Authoring Dialog
- Since:
-
- 6.0
- Inherited From:
-
visit(callback, context)
Executes a callback on the element and its children.
-
The callback is called for the element and all its children.
Parameters:
Name Type Description callback
GuideNode~VisitorCallback context
Object this parameter to be used
- Since:
-
- 6.0
- Inherited From: