Skip Navigation

[Resolved] Checkbox state as conditional in layout, filter.

This support ticket is created 6 years, 9 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 9 replies, has 2 voices.

Last updated by Luo Yang 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#632227

HI . i am trying to hide first then display tabs depending on the selection of one checkbox field.

i have done this using js for select, but is this possible now for checkboxes state ?

#632234

Hello,

Yes, it is possible with custom JS codes, I have searched it in google and found lots of threads, for example:
https://stackoverflow.com/questions/426258/setting-checked-for-a-checkbox-with-jquery
https://stackoverflow.com/questions/7960208/jquery-if-checkbox-is-checked

For your reference.

#632239

can i use this on the filter under wordpress archieve ?

that will be great, i remember last time there is limitations limited to select as its ajax/immediate selection kind off .

#632244

is this a valid js ?

$('checkbox[name="property-type"]').change(function() { }

#632245

Yes, you can use your custom JS codes in any wordpress page, including the Views wordpress archive.

#633474

Hi Luo,
i think you meant single checkbox .
i neeed to use for multiple checkboxes.

example : property type : for rent | for sale .

#637528

Hi Luo. i think checkbox youre refering too. im refering to checkboxes., anyway ive move to use taxonomies for better performance.

#637990

As you can see it is a custom JS codes problem, if you still need assistance for it, please provide a test site with same problem, also point out the problem page URL and view URL, I need a live website to test and debug. thanks

#654217

HI. . will follow up once the staging site is UP. thanks.

#654784

OK, please update this thread when test site is ready. Thanks