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?
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: enlace oculto
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
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)
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: enlace oculto
2. Front-end view, without filter: enlace oculto
3. Filter settings:
- enlace oculto
- enlace oculto
- enlace oculto
4. When a search filter is added, its HTML code and query filter are automatically added:
- enlace oculto
- enlace oculto
5. Front-end view, with filter:
- enlace oculto (unchecked)
- enlace oculto (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: enlace oculto )
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