dojox/form/manager/_FormMixin (version 1.10)

Summary

Form manager's mixin for form-specific functionality.

This mixin adds automated "onreset", and "onsubmit" event processing if we are based on a form node, defines onReset(), onSubmit(), reset(), submit(), and isValid() methods like dijit.form.Form. It should be used together with dojox.form.manager.Mixin.

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

Property Summary

Method Summary

  • isValid() Make sure that every widget that has a validator function returns true.
  • reset() Resets form widget values.
  • startup()
  • submit() programmatically submit form if and only if the onSubmit returns true
  • validate() validate() returns if the form is valid - same as isValid - but provides a few additional (ui-specific) features: it will highlight any sub-widgets that are not valid it will call focus() on the first invalid sub-widget

Event Summary

Properties

accept
accept-charset
action
encType
method
name
target

Methods

isValid()

Make sure that every widget that has a validator function returns true.

Returns:boolean
reset()

Resets form widget values.

Returns:function

Resets form widget values.

startup()
submit()

programmatically submit form if and only if the onSubmit returns true

validate()

validate() returns if the form is valid - same as isValid - but provides a few additional (ui-specific) features: it will highlight any sub-widgets that are not valid it will call focus() on the first invalid sub-widget

Returns:boolean

Events

_onReset(evt)
Parameter Type Description
evt undefined
Returns:boolean
_onSubmit(evt)
Parameter Type Description
evt undefined
onReset()

Callback when user resets the form. This method is intended to be over-ridden. When the reset method is called programmatically, the return value from onReset is used to compute whether or not resetting should proceed

Returns:boolean
onSubmit()

Callback when user submits the form. This method is intended to be over-ridden, but by default it checks and returns the validity of form elements. When the submit method is called programmatically, the return value from onSubmit is used to compute whether or not submission should proceed

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