Navigation überspringen

[Gelöst] Checkbox on Filter not working

This support ticket is created vor 5 Jahren, 11 Monaten. 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/Karachi (GMT+05:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Waqar vor 5 Jahren, 11 Monaten.

Assistiert von: Waqar.

Author
Artikel
#1212535
Anmerkung 2019-03-11 113544.jpg
Anmerkung 2019-03-11 113440.jpg

I have a custom type field with a checkbox and it is saving a string "1" into database if checked and a "0" if not checked. I placed a checkbox filter to display all posts with the custom checkbox checked and it's literaly doing nothing. In the filter settings I can't set a condition, something like string is equal 1 or something. Any idea?

#1212586

Hi Alexander,

Thank you for contacting us and I'll be happy to assist.

I've run similar tests on my website (based on the information from your screenshots), but couldn't reproduce the issue.

I'll recommend checking the "Query Filter" section to see if the filter for the checkbox field, is set as shown in this example screenshot: versteckter Link

In case the issue still persists, you're welcome to share temporary admin login details so that I can see the view's settings from the back-end.

I've set your next reply as private so that only you and our support team will have access to it.

Important note: Please make a complete backup copy of the website, before sharing the access details.

regards,
Waqar

#1213611
Anmerkung 2019-03-13 100448.jpg

Hi!

I think this is a missunderstanding... We don't want to set a filter query in the view. The view will render a list with a FRONTEND Filter and this filter contains a checkbox to filter a specific setting. But this checkbox is not working because it lacks on settings in the view settings. If we set a checkbox as filter we can set it to compare a specific string like String is equal to, but we can't define which value to compare. (Screenshot attached)

#1214051

Hi Alexander,

Thanks for writing back and for sharing the screenshot.

>> If we set a checkbox as filter we can set it to compare a specific
>> string like String is equal to, but we can't define which value to compare

- You don't have to define a value to compare, because it is automatically taken from the generated filter option.
(which in this case would be 1 because your field is a single checkbox type field)

For more clarity, please check the following screenshots:

1. Custom field settings: versteckter Link
2. Front-end view, without filter: versteckter Link
3. Filter settings:
- versteckter Link
- versteckter Link
- versteckter Link

4. When a search filter is added, its HTML code and query filter are automatically added:
- versteckter Link
- versteckter Link

5. Front-end view, with filter:
- versteckter Link (unchecked)
- versteckter Link (checked)

If your checkbox filter is still not working after setting it up like in these screenshots, please make sure that your view's "Custom Search Settings" are correct.
( screenshot: versteckter Link )

Note: As mentioned in my previous reply as well, In case something is still missing, you're welcome to share temporary admin login details so that I can see the view's settings from the back-end.

I've set your next reply as private so that only you and our support team will have access to it.

Important note: Please make a complete backup copy of the website, before sharing the access details.

regards,
Waqar