Combo cursor positioning

I have a problem when using enableFilteringMode where the input to the combobox will auto-populate with the first item retrieved and put the cursor at the end of the item instead of “guessing” the first option and highlighting it, allowing the user to continue typing after the previous letter they typed like in your example here.

How can I change this behavior?

There is a standard behavior of our combo - the behavior you mentioned.
Describe in detail, what is not pleasant to you (the description on points with images) and that you want to have as a result.

My combobox after typing ‘A’:

Your combobox after typing ‘a’:

As you can see in my combobox, the guessed word is thrown in the input, but the cursor is put at the end of the word (not desired behavior).

However, in your combobox, the guess word is thrown in the input, and the cursor is the rest of the guessed word (‘bbreviture’ in this case) instead of being moved to the end.

I’m wondering why my combobox moves the cursor to the end of the word instead of highlighting the untyped portion of the guessed word to allow the user to continue typing after the first letter typed.

I need to know, what version of combo do you have?
If you have the latest one (from 3.0) - make and attach completed demo: … leted_demo

I have version 3 of the combo. Also, I am creating a combobox from an existing select box (dhtmlXComboFromSelect) instead of creating a new combobox from a div like in the example. I am working on creating a demo for you.

Ok. We are waiting…

Demo attached. I’ve found it only runs in IE.
Filtering (208 KB)

Your way of buildeing select (combo) is a littlebit different.
To avoid your issue i recommend you using COMBO like FORM’s item: … combo.html - sample - documentation of building and setting.

I can’t use the JSON style initialization that you link me to. It has to be from an unordered list or xml file.

Here is the demo i made for you based on this sample i forgot to show you: … tions.html

See attachment
sample.rar (103 KB)

So what I’m seeing is that the only way to get the functionality that I’m looking for is to initialize my form from a JSON object. Is this correct?

Sorry, that misled you. look at a new sample - the init is completely from xml in it.
sample_xml.rar (103 KB)

My question is in regard to the formData variable:

[code]formData = [{
type: “settings”,
position: “label-left”,

            }, {
                type: "fieldset",
                inputWidth: "auto",
                list: [{
                    type: "combo",
                    name: "mycombo",
                    label: "Package",
                    connector: "select.xml",
                    value: ""

Is there any way to do this outside of a JSON object, or do I have to use the JSON object? Can I create an li of type combo in UL initilization or an item of type combo in an XML initialization?

The reason I don’t want to use a JSON is because I cannot define a className on a list (dhxlist_base) which prevents me from customizing the css. I suppose I could use a fieldset, but I would prefer to not have to wrap all my different form elements in fieldsets.

You can use my second attached approach WITHOUT json.

myForm = new dhtmlXForm("form1"); myForm.loadStruct("dhxform_combo.xml", f1); function f1(){ combo = myForm.getCombo("mycombo"); combo.enableFilteringMode(true); combo.setComboText(""); }
And this way will allow you to avoid using json.

Where can I find the dhxform_combo.xml file?

I check and add archive once again: all the files are working and attached.
sample_xml.rar (103 KB)

Thank you for your help. I was continuing to run into issues because I referenced the javascript files in an order different than yours. Once I rearranged my calls, I was able to see the desired functionality.

Hurrah :slight_smile:
You are welcome!