Multiselect

Hi,

I want to add multiselect field (control) in event window. I have gone through documentation and found adding of multiselect field in MVC scheduler but no control found in mobile scheduler (DHTMLX Touch Controls). Please advise me to do the same.

–pavan

Hi,

Touch library doesn’t provide multiselect control. You may try to create a new control:

docs.dhtmlx.com/touch/doku.php?i … rm_control
docs.dhtmlx.com/touch/doku.php?i … ol_example

Thank you!

I tried to implement the custom control in my application by following examples provided by you. But it is not rendering/working. Please find the steps followed by me.

  1. Define the custom control configuration
    dhx.protoUI({
    name:“password”,
    defaults:{
    template:function(config){return (config.label+"&nbsp"||“label”)+"<input type=‘password’ maxlength="+(config.maxLength||30)+" style='width:"+(config.inputWidth||100)+“px>”+(config.value||"")+""}
    },
    setValue:function(value){
    this.getInput().value = value;
    },
    getValue:function(){
    return this.getInput().value;
    }
    }, dhx.ui.text);

  2. Include the refernce to create custom control in event window.
    scheduler.config.form = [
    {view:“text”, label:scheduler.locale.labels.label_event, id:“text”, name:‘text’},
    {view:“datetext”, label:scheduler.locale.labels.label_start, id:‘start_date’,name:‘start_date’, dateFormat:scheduler.config.form_date},
    {view:“datetext”, label:scheduler.locale.labels.label_end, id:‘end_date’,name:‘end_date’, dateFormat:scheduler.config.form_date},
    {view:“toggle”, id:‘allDay’, label:"", options: [{value:“0”,label:scheduler.locale.labels.label_time},{value:“1”,label:scheduler.locale.labels.label_allday}], align: “right”,value:“0”},
    {view:“password”,label:“Password”, id:“password”, inputWidth:70, maxLength:5},
    //custom section in form
    {view:“text”, label:“Location”, id:‘location’ }

           ];
    

When I run the application and try to open/load the event window but it is not opening. I have again gone through the sample i.e. docs.dhtmlx.com/touch/doku.php?i … ge_example and found no difference except touchui.js file reference.

I request you to review and let me know your suggestions to solve this.

–pavan

It is a shame, but we have a typo in the online sample ( will be updated asap ), in template you need to have

template: function(config) { return (config.label + "&nbsp" || "label") + "<input type='password' maxlength=" + (config.maxLength || 30) + " style='width:" + (config.inputWidth || 100) + "px'>" + (config.value || "") + "</input>" }

Single quote after “px” was missed