Skip Navigation

[Resolved] Styling Checkboxes

This support ticket is created 3 years, 5 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#2255597

Tell us what you are trying to do?
Hi-
I have set up a Custom Search in Views that has checkboxes. I would like to style the checkboxes on the frontend so that they appear to the user to already be checked off by default. Users will then uncheck any boxes that don’t apply to their situation.
Is there a way to add in some code to make the boxes appear checked off by default?

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2255787

Hello,

There isn't such kind of built-in feature, in the custom search form, it won't check any checkbox by default.

You might consider custom JS codes, for example:

jQuery( "input[name='my-checkbox']" ).prop("checked");

More help:
hidden link