Select like Tree

Volvo Saab Mercedes Audi

DhtmlxForm support this or not ???

or only DhtmlxTree i need to use ???


Unfortunately select does not support optgroups for now.

you may something advise for my solution ?

for example you have form struct like this:

var formData = [{type: "select", name: "test", label: "Account type", options:[...]}];
var myForm = new dhtmlXForm("parentId", formData);

then you can add some custom code and get select object, and add opt groups directly to it:{
    return item.childNodes[1].childNodes[0];
var selectObj = myForm.doWithItem("test","getSelect");

working example would be great full if not difficult :slight_smile:

Try attached please. (29.3 KB)

Thank’s it’s great and what i needed for my task :wink:

and for inspiration …

Hello :slight_smile:

I also need optgroup support in dhtmlxForm 3.0.

It would be very useful if optgroup will part of dhtmlxForm 3.0 Final Version :slight_smile: