Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7175019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:11:24+00:00 2026-05-28T16:11:24+00:00

Hello I have the next problem, I want to render the html of my

  • 0

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 .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:11:26+00:00Added an answer on May 28, 2026 at 4:11 pm

    This require few steps. Problem is that ComboBox has input field underneath, and inputs can’t display html. So first step is to change template which replace input with div. Eg:

    fieldSubTpl: [
        '<div class="{hiddenDataCls}" role="presentation"></div>',
        '<div id="{id}" type="{type}" ',
            '<tpl if="size">size="{size}" </tpl>',
            '<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>',
            'class="{fieldCls} {typeCls}" autocomplete="off"></div>',
        '<div id="{cmpId}-triggerWrap" class="{triggerWrapCls}" role="presentation">',
            '{triggerEl}',
            '<div class="{clearCls}" role="presentation"></div>',
        '</div>',
        {
            compiled: true,
            disableFormats: true
        }
    ]
    

    Then change template which shows selected value:

    displayTpl: Ext.create('Ext.XTemplate', [ 
        '<tpl for=".">',
        '<img src="http://phpbb3.pl/adm/images/icon_edit.gif" />',
        '{[typeof values === "string" ? values : values["title"]]}',
        '</tpl>'
    ])
    

    Another thing is to create new list-item template. Eg:

    listConfig: {
        getInnerTpl: function() {
            return '<div class="search-item">' +
                '<h3><img src="http://phpbb3.pl/adm/images/icon_edit.gif" /><span>{[Ext.Date.format(values.lastPost, "M j, Y")]}<br />by {author}</span>{title}</h3>' +
                '{excerpt}' +
            '</div>';
        }
    }
    

    And the last thing – you must ensure that the value is set correctly into div. For that you should override setRawValue method:

    setRawValue: function(value) {
        var me = this;
        value = Ext.value(value, '');
        me.rawValue = value;
    
        // Some Field subclasses may not render an inputEl
        if (me.inputEl) {
            // me.inputEl.dom.value = value;
            // use innerHTML
            me.inputEl.dom.innerHTML = value;
        }
        return value;
    }
    

    Notice that new template doesn’t contain any input field, so value will not be submited. If you need use such combo with form, you should add hidden input somewhere in fieldSubTpl and set value for it in setRawValue.

    Working sample: http://jsfiddle.net/lolo/8Xs5h/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everybody i'm looking for some help with the next problem: i have a
Hello and excuse me again I have the next problem: I am using fbgraph
Hello I have the next strange problem: I recover the coordinates from a sql
Hello I have next function, what always return null as result, but service calling
I have next code require 'rack/rpc' class Server < Rack::RPC::Server def hello_world Hello, world!
Hello i have 2 arrays and and i want to put them in a
I have a compiling problem. I followed tutorial about Hello world program for Android
hello i have question in Python subprocess module I want to interaction with child
Without any preamble I want to show you problem I have in my program,
Hello I have a problem with this http://jsfiddle.net/E7dGA/1/ When the script starts and you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.