#692 closed defect (fixed)
[patch][cla] ComboBox form name missing
Reported by: | Owned by: | dylan | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When I create a ComboBox widget, the input field's name isn't being set for the submitted form.
This is the code I'm using to create the ComboBox:
<input class="dojo_autocomplete_textfield" id="widget_name" name="name" type="text" /> <script type="text/javascript"> dojo.require("dojo.widget.*"); dojo.require("dojo.widget.ComboBox"); dojo.widget.createWidget( "ComboBox", {mode: "remote", dataUrl: "dojo.pl?name_search=%{searchString}", formInputName: "name"}, dojo.byId("widget_name") );
If I type 'foo' into the ComboBox, and submit the form, I get the values:
'' => 'foo' '_selected' => 'foo'
Looking at the code for html/ComboBox.js, I can see that the variable "formInputName" is never used. It also doesn't seem to be successfully getting the name from the input tag attribute.
Also, is it really necessary for the ${name}_selected value to be sent in the form?
I'm running dojo svn version 3932
Attachments (1)
Change History (7)
Changed 15 years ago by
Attachment: | ComboBox.js.patch added |
---|
comment:1 Changed 15 years ago by
Looking at the source, I've realised that I should have been passing the option "name" rather than "formInputName".
The patch I've just attached deals with 2 issues.
First it removes the reference to the "this.formInputName" value which is never used.
Secondly, if the "name" option isn't passed to the widget constructor, fillInTemplate instead tries to retreive the name from the source fragment.
comment:2 Changed 15 years ago by
Milestone: | → 0.4 |
---|
comment:3 Changed 14 years ago by
Owner: | changed from anonymous to dylan |
---|---|
Status: | new → assigned |
we need a CLA on file to accept patches. Can you fax or email one in so I can apply this patch?
comment:4 Changed 14 years ago by
Summary: | ComboBox form name missing → [patch][cla] ComboBox form name missing |
---|
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
patch for src/widget/html/ComboBox.js