Skip Navigation

[Resolved] Split: Creating checkbox filters to filter types – checkbox filter for single custom field to check empty fields

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.

Our next available supporter will start replying to tickets in about 6.19 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 year, 8 months ago.

Assigned support staff: Minesh.

Author
Posts
#1573115

2- I have a custom text field and I'd like to display the results based on whether there is content or not in it. I.e. the field is called "Note from the master" and is a text field and I'd like a checkbox that when check will search for only articles where that field is not empty.

#1573141

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

2- I have a custom text field and I'd like to display the results based on whether there is content or not in it. I.e. the field is called "Note from the master" and is a text field and I'd like a checkbox that when check will search for only articles where that field is not empty.
==>
Again, there is no direct way to add a checkbox filter for a single line custom field but there is a workaround.

Please check the following related ticket where I mention the steps.
=> https://toolset.com/forums/topic/complex-filter-requirement/#post-871171
=> https://toolset.com/forums/topic/if-types-field-checked-dont-show-post/#post-479071

Further, you need to use view's filter wpv_filter_query where you should adjust the query filter on fly to check your custom field has a value or not. n today. You need to adjust the query filters as per your requirement.

More info:
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query