jQuery UI Widgets Forums Lists ComboBox HTML in placeholder

This topic contains 3 replies, has 2 voices, and was last updated by  Todor 5 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • HTML in placeholder #106480

    hobbes
    Participant

    Is it possible to have HTML-formatted text (specifically, font awesome icons) in both single and multiple <select>s? I tried the obvious route, which didn’t work:

    $(“#multiple-select”).jqxComboBox({
    placeHolder: ‘<i class=”fa fa-user”></i>User’
    });

    HTML in placeholder #106484

    Todor
    Participant

    Hello hobbes,

    You could not add HTML to placeholder property, because it would be displayed as plain string.
    If you want to customize the list items you have to use renderer property as the following example.

    Let us know if you need further assistance.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

    HTML in placeholder #106489

    hobbes
    Participant

    Thank you for the reply! I took a look at the fiddle you sent, and it looks like HTML in the dropdown items is supported, but when I try to use renderSelectedItem() to include HTML, the tags get rendered as text:

    http://jsfiddle.net/wy0gqtja/

    HTML in placeholder #106517

    Todor
    Participant

    Hello hobbes,

    As stated in the jqxComboBox API Documentation, by using the renderSelectedItem function, you can customize the displayed text in the ComboBox’s input field. Unfortunately, you cannot display anything other than text information there.

    Let us know if you need further assistance.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.