Load text field from Combo.

Hello,

Today I carry my combo dynamically, as the image below.

Would you like to know how can I select an item, upload a text field (in this case the “Observação” field) from the ID field of the Combo.

Which event should I use to load the Text field without closing the screen scheduling?


Many Thanks.

Hi,
I think there is no simple method to to this. You need to change the logic of the combo in the “dhtmlxscheduler_editors.js” file. The documentation on the combo:
docs.dhtmlx.com/doku.php?id=dhtmlxcombo:events
You can attach some method to the “onChange” event.

Hi, thank you.

I looked at the link, but could not do something practical.
Is there any example of using this functionality for combo?

So, you can redefine on your page this method to get what you need:

scheduler.form_blocks['combo']={}

In some way like this:

[code]set_value:function(node,value,ev,config){
… // original code
// line 58 where the query is sent
dhtmlxAjax.get(config.script_path+"?id="+selected_id+"&uid="+scheduler.uid(), function(result){
var option = result.doXPath("//option")[0];
var label = option.childNodes[0].nodeValue;
config.cached_options[selected_id] = label;
combo.addOption(selected_id, label);
combo.disable(1);
combo.selectOption(0);
combo.disable(0);
// here you can catch the recieved value and fill some other field
//to set the value in the lightbox control
scheduler.formSection(‘description’).setValue(‘abc’);

});

}[/code]