#8638 closed defect (invalid)
Programatically submitting dijit.form.Form not return falseable, stoppable.
Reported by: | Pete Smith | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit - Form | Version: | 1.2.3 |
Keywords: | dijit.form.Form | Cc: | |
Blocked By: | Blocking: |
Description
I had to submit a form from an outside button click, and do my own submit action- and physically could not get the form to stop submitting natively. I supplied an onSubmit method to the form, args="evt", (dojo.method) and did dojo.stopEvent(evt) as I always have. Strangely, this works in IE!? But ff says that evt is undefined, which it is. I tried doing onsubmit=return false and even doing an _onSubmit dojo/method to try and stop the event, but it won't stop it since it isn't there.
Only workaround is to hide a native submit button and click that one from outside button.
Change History (7)
comment:2 Changed 12 years ago by
Having both onsubmit= and dojo/method for onSubmit are redundant. Also, the button should call submit() and not onSubmit(). Adding
<button dojoType="dijit.form.Button" type="button" onclick="dijit.byId('myForm').submit()">Submit programmatically</button>
after the end form tag in dijit/tests/form/Form.html was shown to work correctly (form could be submitted and was also cancellable).
comment:3 Changed 12 years ago by
I am closing since this seems to be a by product of me overriding dijit.form.Form with my own form. If that does break this it seems odd, but I would imagine it isn't a dijit problem.
comment:4 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing per reporter's request.
comment:7 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|