Mixin to orchestrate dynamic forms (works with DOM nodes).
This mixin provides a foundation for an enhanced form functionality: unified access to individual form elements, unified "change" event processing, and general event processing. It complements dojox/form/manager/_Mixin extending the functionality to DOM nodes.
See the dojox/form/manager/_NodeMixin reference documentation for more information.
Set or get a form element by name.
Parameter | Type | Description |
---|---|---|
elem | String | Node | Array | Form element's name, DOM node, or array or radio nodes. |
value | Object |
Optional Optional. The value to set. |
For a getter it returns the value, for a setter it returns self. If the elem is not valid, null will be returned.
Run an inspector function on controlled form elements returning a result object.
Parameter | Type | Description |
---|---|---|
inspector | Function | A function to be called on a form element. Takes three arguments: a name, a node or an array of nodes, and a supplied value. Runs in the context of the form manager. Returns a value that will be collected and returned as a state. |
state | Object |
Optional Optional. If a name-value dictionary --- only listed names will be processed. If an array, all names in the array will be processed with defaultValue. If omitted or null, all form elements will be processed with defaultValue. |
defaultValue | Object |
Optional Optional. The default state (true, if omitted). |
Register a node with the form manager
Parameter | Type | Description |
---|---|---|
node | String | Node | A node, or its id |
Returns self
Register node's descendants (form nodes) with the form manager
Parameter | Type | Description |
---|---|---|
node | String | Node | A widget, or its widgetId, or its DOM node |
Returns self
Removes the node by name from internal tables unregistering connected observers
Parameter | Type | Description |
---|---|---|
name | String | Name of the to unregister |
Returns self
Unregister node's descendants (form nodes) with the form manager
Parameter | Type | Description |
---|---|---|
node | String | Node | A widget, or its widgetId, or its DOM node |
Returns self