Ticket #5793 (closed defect: fixed)
[patch][need cla] dojo.formToObject doesn't skip form fields having no name...
| Reported by: | guest | Owned by: | alex |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Core | Version: | 1.0 |
| Severity: | normal | Keywords: | dojo.formToObject dojo.formToQuery dojo.formToJson unnamed fields |
| Cc: | vikas.sasidharan@… |
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
Change History
Note: See
TracTickets for help on using
tickets.