Custom Element Select2 cannot get value with .getValues()

Here is the custom item using the wonderful Select2 Library.
ivaynberg.github.com/select2/

[code] dhtmlXForm.prototype.items.select2 = {
render: function(item, data) {
item._type = “select2”;
this.doAddLabel(item,data);
item.appendChild(document.createElement(“input”));
item.lastChild.type=“hidden”;
item.lastChild.name=data.name;
item.lastChild.id=data.uid;
item.lastChild.style.width = data.inputWidth+“px”;
$("#"+data.uid).select2({
placeholder: “Search…”,
minimumInputLength: data.minLength?data.minLength:1,
ajax: {
url: data.connector,
dataType: ‘json’,
data: function (term, page) {
return {
mask: term
};
},
results: function (data1, page) { // parse the results into the format expected by Select2.
return {results: data1};
},
formatResult: function (state) {return state.name;},
formatSelection: function (state) {return state.name;}
}
});
if(data.onchange){
$("#"+data.id).bind(“change”,data.onchange);
}
return this;
},
doAddLabel: function(a,b){
var c=document.createElement(“DIV”);
c.className=“dhxlist_txt_label “+b.labelAlign;c.innerHTML=””+b.label+"";
a.appendChild©;
if(b.label.length==0)c.style.display=“none”;
if(!isNaN(b.labelWidth))c.style.width=parseInt(b.labelWidth)+“px”;if(!isNaN(b.labelHeight))c.style.height=parseInt(b.labelHeight)+“px”;if(!isNaN(b.labelLeft))c.style.left=parseInt(b.labelLeft)+“px”;if(!isNaN(b.labelTop))c.style.top=parseInt(b.labelTop)+
“px”
},
// destructor
destruct: function(item) {
$("#"+item.uid).select2(“destroy”);
},
// enables item
enable: function(item) {
item._is_enabled = true;
$("#"+item.uid).select(“enable”);
},
// disables item
disable: function(item) {
item._is_enabled = false;
$("#"+item.uid).select(“disable”);
},
setValue: function(item, data) {
// data is object with variables “id” and “text”
$("#"+item.uid).select2(“val”, data);
},

        getValue: function(item) {
            return document.getElementById(item.uid).value;
        }
    };[/code]

How do I include the field in .getValues()?

docs.dhtmlx.com/doku.php?id=dhtm … s.somefunc

dhtmlXForm.prototype.getFormData_select2 = function(name) {…}
dhtmlXForm.prototype.setFormData_select2 = function(name,value) {…};