I’d like to replace the common input’s labels with some images.
I have a multicheckbox with a country list, and I want to display for each checkbox the country flag instead of it’s name.
I tried to put an <img/> tag as label value, but this html is escaped and displayed as text instead of displaying the images…
Is there a native solution ? Should I create a custom decorator ?
I’m currently trying to create a custom decorator but I’m noob and I’m pretty sure there is an other cleaner way for this ! Thanks for help…
Ok I finally found by myself… It was so simple that I didn’t even think about it.
When you create a form element, it’s possible to set the option
escapetofalse:As my checkboxes’ labels aren’t escaped anymore, I can set some html inside 🙂