Opened 10 years ago

Closed 10 years ago

#14794 closed defect (worksforme)

Form in Dojo 1.7 ignores method and action attributes

Reported by: thesociable Owned by: Douglas Hays
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:


Subclassed Form previously in 1.6 and having updated to Dojo 1.7 the form submission stopped working correctly. It appeared to be ignoring the "method" and "action" attributes on my subclass.

Looking in the source at the changes from 1.6 to 1.7 I see that attributeMap in Form.js has been removed. However, no replacement _setXAttr methods have been added. I fixed the issue locally in my subclass by adding:

    _setActionAttr: 'containerNode',
    _setMethodAttr: 'containerNode',

Should this actually be provided by the base Form implementation or have I missed something in the conversion?



Change History (2)

comment:1 Changed 10 years ago by bill

IIRC the attributes are copied automatically to this.domNode, assuming that this.domNode is a <form>. I'm guessing that's the case in dijit.form.Form, but not in your subclass. Did you see an actual problem with dijit.form.Form, or just w/your subclass?

comment:2 Changed 10 years ago by Douglas Hays

Resolution: worksforme
Status: newclosed

dijit/tests/form/test_Select.html shows a dijit.form.Form widget that has the method copied from markup. I added action="dojo" and it was copied to the FORM element as well. I also changed the markup FORM to be just a DIV, and the FORM element was still created with attributes copied.

Note: See TracTickets for help on using tickets.