- How to add image + text inside dropdown options in X-Editable ? The required shown in below image
Assuming the dropdown is a Select2 widget that your code can access, use the templating features:
- Dropdown templating controls how items appear in the dropdown list.
- Selection templating controls how selected items appear when the dropdown is closed.
You will likely need both, although you should be able to use the same callback function for both templates (assuming you want dropdown and selected items to look the same.