How to change filter logic for checkboxes in search module

How to change filter logic for checkboxes in search module

There is a new type of behaviour for the checkbox field in DJ-Classifieds custom fields.

If you are using the search option for the field, you can select two or more fields, and in the results, you can see the ads that include all the selected fields.

Previously, the displayed results contained the chosen fields. Still, it did not automatically mean that the advert included everything that was marked - it was enough that it contained at least one of the selected fields to be displayed in the list. Now you have the choice!

Let’s see how to configure this option at the backend.

Open the DJ-Classifieds component and choose “Fields.”

Choose an existing field or create a new one. Go to “Search options” tab.


  1. - “In search” must be set to “Yes.” Without that the other option won’t be available.
  2. - “Search type” must be set to “Checkbox.” This option works with the checkbox only.
  3. - “Search filter logic” interests us the most here.

As you can see, there are two possibilities to choose from:

  • Or” - choose it and the results will be filtered with any of the selected values
  • And” - choose it and the results will be filtered with all selected values (this is the new option for DJ-Classifieds)

Configuration with the “or” option enabled.

On our example, for DJ-Classifieds configuration, we have used fields called “External features.” They will be used for filtering results from “Real Estate” category with “parking” and “garden.”

There are five results displayed for this category at the moment. Displayed ads include “parking” or “garden.”

Let’s see how it looks on the front page.


Configuration with the “and” option enabled.

There are 2 results displayed for this category at the moment. Displayed ads include “parking” and “garden.



      • Related Articles

      • Custom fields in search/filter module

        We want to show you how to add a custom field in DJ-Classifieds and search for items using defined field. All custom fields can be visible in a single item view and DJ-Classifieds search box as well.  Check our short tutorial and see how to do it. ...
      • Extra/Custom fields in DJ-Classifieds

        The DJ-Classifieds component allows assigning additional fields to the advert details from a certain category. Settings To create a custom field, click on the Extra Fields button from the Control Panel, then click New from the top right toolbar, and ...
      • Always display extra fields for all categories in search/filter module

        Suppose you have custom fields assigned to all categories you may want to always display in the Filters/Search Module. In this case, users' won't need to choose any category to reveal the custom fields applied to all categories. Settings: First, in ...
      • How set a default search for all values in custom field

        In DJ-Classifieds you can decide if you want to allow your users to find the items with predefined filters for custom fields or also give them the possibility to search by all custom fields' results. Once adding a new custom field, you provide the ...
      • How to set field groups for custom fields in the registration

        There is a possibility of creating a group of custom fields in the registration form and assigning them to Joomla groups. It allows for displaying different fields for different groups.  To configure this feature, open the DJ-Classifieds component ...