Skip Navigation

[Resuelto] Customize CRED Checkboxes

This support ticket is created hace 6 años, 4 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Nigel hace 6 años, 4 meses.

Asistido por: Nigel.

Autor
Mensajes
#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

Idiomas: Inglés (English ) Español (Español )

Zona horaria: 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: enlace oculto

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/