Opened 12 years ago

Closed 11 years ago

#5793 closed defect (fixed)

[patch][need cla] dojo.formToObject doesn't skip form fields having no name...

Reported by: guest Owned by: alex
Priority: high Milestone: 1.1
Component: Core Version: 1.0
Keywords: dojo.formToObject dojo.formToQuery dojo.formToJson unnamed fields Cc: vikas.sasidharan@…
Blocked By: Blocking:

Description

If you do dojo.formToObject() on a form, it doesn't ignore form fields that don't possess any name (such as those typically used by Dojo Widgets behind the scenes). Because of this, the generated query contains a lot of useless parameters of the form "?=val1&=val2..." etc.

I believe this bug is occurring because the filtering logic only checks for disabled items.

Suggested fix: Change line no. 60 in xhr.js :

Is:

return (!node.disabled);

Should Be:

return (!node.disabled && node.name);

Attachments (1)

test.html (2.9 KB) - added by guest 11 years ago.
Added CLA... No other change.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by dylan

Milestone: 1.1
Owner: changed from anonymous to alex
Summary: dojo.formToObject doesn't skip form fields having no name...[patch][need cla] dojo.formToObject doesn't skip form fields having no name...

Can we please get a CLA for the testcase?

comment:2 Changed 11 years ago by Adam Peller

(In [12669]) Incorporating fix, but can't take test case w/o cla. Refs #5793

comment:3 Changed 11 years ago by Adam Peller

Priority: highnormal
severity: majornormal

comment:4 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: newclosed

can't check in the test case without a cla. please reopen if you can get us a cla. thanks

Changed 11 years ago by guest

Attachment: test.html added

Added CLA... No other change.

Note: See TracTickets for help on using tickets.