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)
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Lists › ComboBox › HTML in placeholder
Tagged: combobox font-awesome select multiple, javascript combobox, jquery combobox, jqwidgets combobox
This topic contains 3 replies, has 2 voices, and was last updated by Todor 5 years, 3 months ago.
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’
});
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
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:
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
You must be logged in to reply to this topic.