Dhtmlxform Select load data from database


Dear All.
I am trying new Dhtmlx Suite 6, there is a “select” item in my form. how to load the options data of select item from database ? in Dhx 5 there is an attribute connector to get the options from database.

Thank you


Such feature is not available for the select item.
Please, try to use the combo item.
using the getItem method you are able to get the dhtmlxCombo object of combo item an load the required data to it.


thanks for your help, semantik :grinning:


Just throwing in an update for anyone coming back to this topic: You can use the same concept as semantik’s idea above with the combo item, but using the select item. Maybe this has been added since semantik answered previously.

var url = "/path/to/REST/api"
    var opts = [{value:"",content:""}]; // I usually include a blank "not set" option
    for (var i=0;i<data.records.length;i++){
        var rec = data.records[i];
    var sel = form.getItem("select_id");
    sel.setConfig({label:"Label Text",options: opts});