Oct 06, 2012, 3:19 PM
Multicombo show different field(s)
Not an isue, but an alternative for others which are looking for such option:
The idea is to show something like ShortName(LongName) in picker list, but to display only ShortName in edit field.
I wanted to avoid functions overwrite or too much javascript.
On short, add the below row in Show listener (ShortName have to be set as DisplayField in this example):
The default this.picker.tpl.html is the folowing:
Didn't find breaks in functionality until now.
The idea is to show something like ShortName(LongName) in picker list, but to display only ShortName in edit field.
I wanted to avoid functions overwrite or too much javascript.
On short, add the below row in Show listener (ShortName have to be set as DisplayField in this example):
<Show Handler="var pick=this.getPicker(); var xhtml=this.picker.tpl.html; this.picker.tpl.html=xhtml.replace('{ShortName}','{ShortName}({LongName})');" />
Of course, ShortName/LongName have to be valid record fields.The default this.picker.tpl.html is the folowing:
<ul><tpl for="."><li role="option" class="x-boundlist-item"><div class="x-combo-list-item {[this.getItemClass(values)]}"><div class="x-mcombo-text">{displayField}</div></div></li></tpl></ul>
so, you can play with html a bit.Didn't find breaks in functionality until now.
Last edited by Daniil; Oct 08, 2012 at 8:28 AM.
Reason: Please use [CODE] tags