Basic form class for most AMOS form classes. This class inherits _FormConstruct class.
Type | Description | |
active | Boolean | If true, this forces the control to enter the active state and classname 'amos-form-active' will be added. |
busy | Boolean | If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added. |
disabled | Boolean | If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted. |
error | Boolean | If true, this forces the control to enter the error state and classname 'amos-form-error' will be added. |
filled | Boolean |
A flag that shows whether a form element is filled in (true) or empty (false). |
label | String |
Label of an element. |
name | String |
Name of control. When sending a request to server, this property is the parameter's name. |
readOnly | Boolean | If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission. |
valid | Boolean |
Validity flag that shows whether a form element is validated to be valid (true) or invalid (false). |
value | String | Number | Object |
Value of the element. |
viewMode | Boolean | If true, the control will show only the displayedValue. |
Return type | Description | |
hide(elem?) | None |
Hide a specified element. The hidden element will not be displayed at all. |
isValid() | Boolean |
Returns true when value validation succeeded; otherwise, false. |
isVisible(elem?) | Boolean |
Return true if the element is visible, otherwise false. |
reset() | None |
Reset all state and value to default. |
show(elem?) | None |
Display a specified element. |
toggle(elem?) | None |
Toggle visibility of a specified element. |
Default value: false
Default value: false
Default value: false
Default value: false
A flag that shows whether a form element is filled in (true) or empty (false).
Default value: false
Name of control. When sending a request to server, this property is the parameter's name.
Default value: false
Validity flag that shows whether a form element is validated to be valid (true) or invalid (false).
Default value: true
Hide a specified element. The hidden element will not be displayed at all.
<Node>
elem
|
Optional |
Specified element to be hidden. |
Return true if the element is visible, otherwise false.
<Node>
elem
|
Optional |
Specified element to be checked. If not specified, domNode of the widget is used instead. |
Reset all state and value to default.
Display a specified element.
<Node>
elem
|
Optional |
Specified element to be displayed. |
Toggle visibility of a specified element.
<Node>
elem
|
Optional |
Specified element to toggle visibility. |