Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#692 closed defect (fixed)

[patch][cla] ComboBox form name missing

Reported by: [email protected] Owned by: dylan
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


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">
		{mode: "remote", 
		dataUrl: "{searchString}", 
		formInputName: "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)

ComboBox.js.patch (759 bytes) - added by [email protected] 16 years ago.
patch for src/widget/html/ComboBox.js

Download all attachments as: .zip

Change History (7)

Changed 16 years ago by [email protected]

Attachment: ComboBox.js.patch added

patch for src/widget/html/ComboBox.js

comment:1 Changed 16 years ago by [email protected]

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 16 years ago by bill

Milestone: 0.4

comment:3 Changed 15 years ago by dylan

Owner: changed from anonymous to dylan
Status: newassigned

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 15 years ago by dylan

Summary: ComboBox form name missing[patch][cla] ComboBox form name missing

comment:5 Changed 15 years ago by dylan

Resolution: fixed
Status: assignedclosed

(In [5695]) fixes #692, ComboBox? form name missing, thanks for the patch

comment:6 Changed 15 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.