jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ComboBox › Typed value of ComboBox not submitted
Tagged: combobox
This topic contains 14 replies, has 5 voices, and was last updated by Peter Stoev 10 years, 11 months ago.
-
Author
-
If I have a combo box named “State” as a form element and I submit the form the value for “State” is always what was selected from the list rather than what was typed into the box (defeating the purpose of using a ComboBox rather than a DropDownList). For example, if I select “California” from the list, then I type into the box “SomethingElse”, when I look at the submitted form fields it says “State=California”.
I using jqWidgets version 4.7 and Windows Vista and have tried in the following browsers:
IE9
Chrome 25.0.1364.97
Firefox 19.0Thanks for your help.
Hi deadline,
At present, the ComboBox submits always the selected item from the list. We will consider whether this logic should be changed in the future.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI agree this is a problem.
I just spent quite a bit of time trying to figure out why my typed data wasn’t being sent in the $_POST. A ComboBox is a ComboBox because you can pick an item from the list or send a new value. Otherwise it’s just a DropDownList.
Hi guys,
We agree that the widget should submit the typed in or selected value.
In the next version, the ComboBox will submit the value from its input field.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Is the fix already implemented in the latest release?
Kind regards,
KarenHi Karen,
You can try the jqxComboBox’s submit behavior in our online demos. Ex: http://www.jqwidgets.com/jquery-widgets-demo/demos/php/billing_form.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Thanks for the quick reply.
However, I am trying to do a multiselect combobox. If I get items from the dropdown, there is no problem. However, I cannot get the items which are not from the list. Am I doing the right thing?var items = $(“#input”).jqxComboBox(‘getSelectedItems’);
Thanks and kind regards,
KarenHi Karen,
Which items do you want to get – selected items or all items?
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comall items , both of those from autocomplete and the typed (non-autocomplete) items.
Kind regards,
KarenHi Karen,
To get all items loaded in jqxComboBox, use the “getItems” method.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I wanted to get the value of the input field. If I use multiselect, can I still type something in the field and get its value?
Thanks and kind regards,
KarenHi Karen,
No, you cannot do that. Custom values when “multiselect” is enabled are not allowed.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
So a combobox set as multiselect is just like dropdownlist then.
as stated in the previous replies:
A ComboBox is a ComboBox because you can pick an item from the list or send a new value. Otherwise it’s just a DropDownList.
Can you recommend any workaround for this?
Thanks.
I have the same need – to use the ComboBox in multiselect mode, and be able to select some items from the list, plus type in other items that are not on the list…
Hi serge012374,
It is not possible to type items which are not in the list in multiselect mode. I am afraid that we do not plan to make changes about that feature in the future versions.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.