Ticket #5775 (closed defect: worksforme)
Broken Backwards compatibility for dijit.form.Form
| Reported by: | nathan | Owned by: | doughays |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
In the latest code from svn, it appears that dijit.form.Form's execute method is deprecated. That's fine, but if I want to use a dijit.form.Form as a subwidget of another widget, how can I tie in to the submit event?
What worked previously in a templateString: <form dojoType="dijit.form.Form" dojoAttachEvent="execute:_processForm">
I tried setting dojoAttachEvent="onSubmit:_myFunc" and dojoAttachEvent="submit:_myFunc" - but neither of them have a way of "cancelling" the event from firing (the form still gets submitted). Tying in to execute previously (in 1.0.2) would attach me when the form was submitted (by pressing <enter> or by clicking a submit button).
Maybe a good compromise would be to offer an option on dijit.form.Form - so that you can do something like this: <form dojoType="dijit.form.Form" dojoAttachEvent="onSubmit:_processForm" doSubmit="false">
doSubmit would default to true - but the onSubmit() function for dijit.form.Form would then return (this.isValid() && this.doSubmit) instead of just this.isValid()