combo binding

http://webix.com/snippet/18ffefcd

in my example I’ve got a form that is bind with a list.
If I select from the combo “2001: a space odyssey” and then I click on “save” the list updates but with the id and not with the value of my combo. Is it possible to update the list with combo’s value?

Hello,

You are right, there’s an issue. Webix components are bound on the base of their value, not visible text. But here’s a workaround defined via a complex richselect configuration:

 {
      view:"richselect", width:300, yCount:2,
      label: 'Film Title',  name:"title",
      value:1, options:{
           data:[
                { id:1, value:"2001: a space odyssey"  },
                { id:2, value:"TestA"},
                { id:3, value:"TestB"}
           ],
           on:{ //obj {id:1, value:"2001: a space odyssey"}
                'onValueSuggest':function(obj){
                     //getting richselect object
                     var master = $$(this.config.master);
                     //blocking events for richselect
                     master.blockEvent();
                     //setting text value
                     master.setValue(obj.value);
                     master.unblockEvent();
                  }
            }
        }
}

http://webix.com/snippet/7d484f94

The advanced richselect settings can be studied here.

The other possible solution is define a list of options where ids and values are equal

http://webix.com/snippet/988542bd

Also, there is a more complex approach, where template of list can be configured to convert the id value to the correct text