new Form()
A form.
Members
fields :Object.<String, ICE.UI.Input>
The form fields.
Type:
- Object.<String, ICE.UI.Input>
initial :Object.<String, *>
The initial values of fields.
Type:
- Object.<String, *>
Methods
add(input)
Adds field to form.
Parameters:
Name | Type | Description |
---|---|---|
input |
ICE.UI.Input | The input component. |
changed(input)
Invoked when input value changes.
Parameters:
Name | Type | Description |
---|---|---|
input |
ICE.UI.Input | The input component. |
validate(reportopt) → {boolean}
Validates form.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
report |
boolean |
<optional> |
The flag wheter validation should report errors. |
Returns:
true if form is valid, false otherwise.
- Type
- boolean
value(name, value) → {*}
Sets or gets field value.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The field name. |
value |
* | The field value to set. |
Returns:
The field value.
- Type
- *
values(values) → {Object.<string, *>}
Sets or gets field values.
Parameters:
Name | Type | Description |
---|---|---|
values |
Object.<string, *> | The values to set. |
Returns:
The field values.
- Type
- Object.<string, *>