Hello I have the next problem, I want to render the html of my display value in a combobox, at the moment I load a store with the html ready, it renders the html when I show all of them, but when I select one, it show the html.
What can I do to render the html when the item is already selected?
Here are some images to help to explain the inconvenient:
This is when Im going to select one
https://i.stack.imgur.com/TcfRA.jpg
This is when I select one
https://i.stack.imgur.com/Kzi9r.jpg
The Html that I’m rendering is the next one:
<img class="io_img" src="/files/images/io-P.gif"/><div class="io_desc">hola</div></div>
Thanks in advance.
PD: Sorry to no show the images, and just the links, but I don’t have enough reputation to show images directly .
This require few steps. Problem is that
ComboBoxhas input field underneath, and inputs can’t display html. So first step is to change template which replace input with div. Eg:Then change template which shows selected value:
Another thing is to create new list-item template. Eg:
And the last thing – you must ensure that the value is set correctly into div. For that you should override
setRawValuemethod:Notice that new template doesn’t contain any
inputfield, so value will not be submited. If you need use such combo with form, you should add hidden input somewhere infieldSubTpland set value for it insetRawValue.Working sample: http://jsfiddle.net/lolo/8Xs5h/1/