How to add icons to checkboxes?

Support MB Builder How to add icons to checkboxes?Resolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4349
    LufruttaLufrutta
    Participant

    I made a long checkbox_list with the MB Builder plugin. Is there a possibility to add a different icon in front of each checkbox or instead of the label of the cb?

    #4350
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think the only way to do that is using custom CSS, something like this:

    input[type="checkbox"][value="xxx"] {
        background: url(image.jpg);
    }

    By default, the plugin outputs the checkbox only and CSS is the only way I think can resolve this.

    Edit: Sorry, I was thinking about normal checkbox fields built without the Builder. I think the Builder don't have such feature.

    #4358
    LufruttaLufrutta
    Participant

    CSS does not work. The code seems to be OK but will not be rendered in the backend. So I set it within the label field of the Buider and it worked. Not really professional, isn't it?

    Metabox Builder
    Backend

    #4362
    Anh TranAnh Tran
    Keymaster

    That also works :). Remember to strip_tags on the frontend when you retrieve the meta value 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.