dojox/form/manager/_EnableMixin (version 1.10)

Summary

Form manager's mixin for controlling enable/disable state of form elements.

This mixin provides unified enable/disable functionality for form widgets and form elements. It should be used together with dojox.form.manager.Mixin.

See the dojox/form/manager/_EnableMixin reference documentation for more information.

Method Summary

  • disable(state) Disable form controls according to the supplied state object returning the previous state.
  • enable(state,defaultState) Enable form controls according to the supplied state object.
  • gatherEnableState(names) Gather enable state of all form elements and return as a dictionary.

Methods

disable(state)

Disable form controls according to the supplied state object returning the previous state.

Parameter Type Description
state Object
Optional

Optional. If a name-value dictionary, the value is true to enable and false to disable. If an array, all names in the array will be disabled. If omitted, disables all.

Returns:undefined
enable(state,defaultState)

Enable form controls according to the supplied state object.

Parameter Type Description
state Object
Optional

Optional. If a name-value dictionary, the value is true to enable and false to disable. If an array, all names in the array will be set to defaultState. If omitted, all form elements will be set to defaultState.

defaultState Boolean

The default state (true, if omitted).

Returns:function

Enable form controls according to the supplied state object.

gatherEnableState(names)

Gather enable state of all form elements and return as a dictionary.

Parameter Type Description
names Object
Optional

If it is an array, it is a list of names to be processed. If it is an object, dictionary keys are names to be processed. If it is omitted, all known form elements are to be processed.

Returns:undefined
Error in the documentation? Can’t find what you are looking for? Let us know!