multiselect selected=true not working


I have worked with dhtmlx 2.6 and there the multiselect is working perfectly. I’m generating the multiselect box from an xml file and there the pre-selected items are selected by selected=‘true’ options.

I have downloaded dhtmlxForm 3.6 version and now this preselected is not working. multiselect box generated successfully but I selected=true options are not selected.

I wondered - where i was also trying to run the sample page 02_text_select_pwd.html which is indie \dhtmlxForm\samples\02_items\02_text_select_pwd.html directory . There I also found that selected=true is not working also.

Can somebody please inform me what is the problem with this selected=true option in new dhtmlx ?


After doing some debugging I found that the following piece of code is responsible for that -
The code is taken from dhtmlxForm.js file = { render: function (a, b) { a._type = "se"; a._enabled = !0; a._value = null; a._newValue = null; if ((_isFF || _isIE) && typeof b.inputWidth == "number") b.inputWidth += a._inpWidthFix || 2; this.doAddLabel(a, b); this.doAddInput(a, b, "SELECT", null, !0, !0, "dhxform_select"); this.doAttachEvents(a); this.doLoadOpts(a, b); b.connector ? this.doLoadOptsConnector(a, b.connector) : b.value != "undefined" && this.setValue(a, b.value); return this }

When the code execute the following line then the selected options again deselected.
b.connector ? this.doLoadOptsConnector(a, b.connector) : b.value != “undefined” && this.setValue(a, b.value);

Is it a bug ?

Could you provide us completed demo to reproduce the isuue? … leted_demo
Please, send it on

I am having this same problem

{type: ‘multiselect’, name: ‘Category’, label: ‘Category:’,options:[
{text: ‘None’, value: ’ '},
{text: ‘Business’, value: ‘Business’, selected: true},
{text: ‘Personal’, value: ‘Personal’, selected: true}]}

Draws with no items selected, this will work though

{type: ‘multiselect’, name: ‘Category’, label: ‘Category:’, value:‘Business,Personal’, options:[
{text: ‘None’, value: ’ '},
{text: ‘Business’, value: ‘Business’},
{text: ‘Personal’, value: ‘Personal’}]}

Hallo, andyCL
You can provide us completed demo too as i’ve mention in my previous post.

Here is a link I made a while ago I forgot about. The json file this is loading should have 3 lines selected … elect.html

In version 3.6 locally everything works fine. Try to update your version to solve this issue.

hi to all

b.connector ? this.doLoadOptsConnector(a, b.connector) : (typeof(b.value)!= “undefined” && b.value != null && this.setValue(a, b.value));

As far as I know everything is already on 3.6. Locally on my C: drive I could get this to work after modifying the example code but its only on the server its not working. I double checked all the .js files on my server its referencing and they all have //v.3.6 build 130619 at the top. Is there anything you can see on your end to indicate its not 3.6?

Ignore previous post, here is a zip of what I can reproduce locally on 3.6

dhtmlxForm/samples/02_items/multiselect.html (435 KB)


please try attached update (16.6 KB)

no it does not work in 3.6. I downloaded the latest version, the demo in it also can not work.


Please, complete for us a demo and provide it. … leted_demo


issue already fixed in latest version
attached is a fix for version from your post (16.6 KB)