Skip Navigation

[Resolved] Customize CRED Checkboxes

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 6 years, 4 months ago.

Assisted by: Nigel.

Author
Posts
#953712

Hi,

I need to customize the checknoxes style. I try in different way but nothigs works.
Can you please suggest the right way to customize the checkbox?

Now I see the defoult gray chechboxes. I'd like to display them in white background and colored when checked.

Thank you

#954355

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Domenico

You cannot modify the styles of the checkboxes, which are determined by the browser.

You can, however, use CSS to hide the actual checkbox and display a fake checkbox of your own design in its place with the same functionality.

There are many articles and examples online about the CSS required for such a solution.

However, they typically require that a particular HTML structure for the checkboxes, namely the input followed by the label.

The normal markup generated by Toolset for checkboxes is to have the input inside the label tags, which makes a CSS solution more difficult.

However, you can add the attribute output="legacy" to your checkboxes custom field and it will render the HTML in the required format of input then label.

One such example (of many) is here: hidden link

Note that if you are adding custom CSS to your form there is an open issue for which you would need to apply the patch available here: https://toolset.com/errata/quotes-in-the-extra-css-or-js-content-will-get-backslashed/