Skip to content

Instantly share code, notes, and snippets.

@joeke
Created September 28, 2016 11:17
Show Gist options
  • Save joeke/5506c89d31f12c4121668e0c628b5db0 to your computer and use it in GitHub Desktop.
Save joeke/5506c89d31f12c4121668e0c628b5db0 to your computer and use it in GitHub Desktop.
extjs: custom tpl for combobox list option
{
xtype: 'modx-combo'
,width: 200
,name: "id"
,id: config.id + '-user-field'
,url: MODx.config.connectorUrl
,fields: ['id', 'firstname', 'lastname']
,tpl: '<tpl for="."><div class="x-combo-list-item" >{firstname} {lastname}</div></tpl>'
,displayField: 'firstname'
,baseParams: {
action: 'mgr/user/getlist'
,limit: 0
}
,listeners: {
'select': {
fn:this.filter,scope: this
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment