Custom Fields
Re-Envisioned
Support Meta Box Builder How to add icons to checkboxes?

This topic contains 3 replies, has 2 voices, and was last updated by  Anh Tran 2 years, 6 months ago.

  • Creator
    Topic
  • #4349
    Resolved
    Lufrutta
    Participant

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #4350

    Anh 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

    Lufrutta
    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 Tran
    Keymaster

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

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.