Product Support

Participants Database Combo-Multisearch Add-On

A Participants Database Add-On providing two different configurable multiple-field search capabilities.

Product Setup

The Combo Multisearch Plugin offers two main search control types: a single text input (like a search engine) or a sets of selectors/checkboxes/text fields that set a search term for each field. Both search types may be used, but in most cases, you’ll be using one or the other.

Setting up the Combination Search

To set up the Combo Search, you’ll need the names of all the fields you want searched with the user’s input. Type the names as a comma-separated list into the “Combination Search Fields” setting. To disable the combo search, leave the setting blank.

The “label” and “placeholder” settings give you two ways to prompt the user. The “label” is shown alongside the text input, and remains visible when the user types in their search. The “placeholder” is shown inside the text input, and disappears when the user begins to type in a search. A placeholder is good when you don’t need to explain much and want a clean, simple interface. The label is good for situations where you want to explain a little bit what the search is for. You can use either, neither, or both if you want.

Combo Search Modifiers

The “combo search modifiers” are a set of radio buttons to allow the user to set the type of search desired: “any,” “all,” or “phrase.” When enabled, these radio buttons will be shown next to the combo search input. There is a default search type that will be initially selected, and this is also the search mode that will be used if the combo search modifiers are not shown.

Autocomplete

“Autocomplete” is also known as “autosuggest” and provides the user with a list of suitable search terms. The list of suggested search terms is shown as a pop-up window when the user begins typing, and the list is pared down as the user types in more letters. The list of autosuggest words is drawn from the database, so it can reliably guide the user to search terms that will yield results.

The fields that the autocomplete terms are drawn from is defined in the “Combo Search Autocomplete Fields” setting. It is a list of field names like the “combination search fields” setting. This means that the combo search can search on fields that don’t contribute to the autosuggest. This is helpful in cases where some of the fields searched contain blocks of text, which could add a lot of useless terms to the autosuggest list.

Multi-search provides a comprehensive interface for searching on multiple fields. Each field included in the search is provided with a search control appropriate to the type of field. The search control generates five different types of search control: text input, checkboxes, radio buttons, dropdowns and multi-select dropdowns.

To configure the multi-search, put the list of field names you want included in the search in the “Multi Search Fields” settings as a comma-separated list.

For dropdown, checkbox and radio button controls, the selections shown can either be drawn from the field definition, or from the database entries. If “Use DB Values in Dropdowns” is checked, a list of unique values is gotten from the database entries and used as the selections presented, so every selection will find a match in the database.

It’s also possible to generate a dropdown selector for text fields, by enabling “Text Fields as Dropdown Selectors.” This provides the user with a set of words to choose from that are taken from database entries. For instance, if one of the fields in the multisearch is “First Name,” the search control would be a dropdown of all the unique first names in the database.

Filter Search Mode

The Combo Multisearch has two general modes of operation. With “filter mode” on, all chosen search values must be present in the record for it to be included in a search result. If filter mode is off, a record will be included in the results if any of the provided search terms is present in the record.

Each search type, combo or multi, has a “Whole Word Match Only” switch so that searches made will only match a complete word in the search, not portions of a word.

Returning to the Search Results

Under the General settings tab, is a checkbox to enable restoring the previous search when returning to the search page. This is convenient for users who need to navigate away from the search page and wish to return to the same page of results. If this is unchecked, the search page will be reset every time it is loaded.

Showing the Search Control

The Combo Multisearch Add-On provides it’s search capabilities through the use of a special template. There is a template for the list display and for the stand-alone search display. Once the plugin settings are defined, the template must be called in the shortcode like this:

[pdb_list template=multisearch ]

The plugin now also includes a table-less responsive template for the list multisearch shortcode:

[pdb_list template=multisearch-responsive ]

Or for the standalone search like this:

[pdb_search template=multisearch ]

This uses the plugin’s built-in template, but you can also add Combo Multisearch to any list or search shortcode template by using the template functions provided by the plugin.

It is also possible to define the list of fields to search in the shortcode, for instance:

[pdb_list template=multisearch search_fields='company,city,state']

If you need to have the search control in a different location then where the results are displayed, you can do that with the [pdb_search] shortcode. You need to use the “target_page” attribute to tell the search shortcode where the results are to be displayed. The [pdb_list] shortcode is used to display the results.

For example, if your results are displayed on a page named “listings” then your search control shortcode will be like this: [pdb_search template=multisearch target_page=listings]. That shortcode can be placed anywhere. If you want to put it into a sidebar widget, you’ll need a plugin that will allow a shortcode in a widget.

Then, on the “listings” page, put [pdb_list]. There is no need to set the template to multisearch unless you want another search control to appear at the top of the results.

Target Instance

In cases where the [pdb_list] shortcode is on a page with other Participants Database shortcodes, you may need to set the “target_instance” attribute to target the specific list shortcode where you want the results to appear. To find the target instance value, you must inspect the HTML. At the top of the list display, you will see a classname in the wrapper such as “pdb-instance-2” That means the list is instance 2, and you would need to put that value as the target instance in the search control shortcode, like this: [pdb_search template=multisearch target_page=listings target_instance=2].

F.A.Q.

Can I use both the Combo Search and Multi Search at the same time?

Yes, you can, but the set of fields selected for the Combo Search Fields should be different than the fields configured in Multi Search Fields. It will still work, but the results might not be as expected because the combo search will override the multi search if both are searching on the same field.

Is it possible for the user's last used search to be restored when they return to the search page?

Yes, there is a setting under the “General” tab in the Combo Multisearch settings called “Remember the Last Search” and if checked, it will store the search parameters for the last search on the user’s browser. This means that even if they leave the site and come back later, the last search they used will still be there. If “Clear” is clicked the stored search is erased.

I want to pre-load the search terms when linking to the search page. How do I do that?

Yes, it is possible to place the search terms in the URL, and they will pre-load into the search form.

For Multi Search, each field you want to preload a search term into needs to be named and given a value. For example, you want to take the user to the search page set up to find all the brewpubs in Seattle. Your link would look something like this:

https://xnau.com/search/?city=seattle&business_type=brewpub

The “city” and “business_type” fields would then be filled with the vales in the URL. Of course, the fields named must be configured to appear in the Multi Search inputs.

You can do the same for the Combo Search, but there is only one field, named “combo_search” so if you wanted to do the same kind of thing as our example above, you could use a URL like this:

https://xnau.com/search/?combo_search=seattle%20brewpub

You’ll notice the %20 in the search term: this is code for a space, this is needed because URL’s cannot contain spaces. Take a look at this reference to learn more about using query strings in URL’s.

I want to combine Combo Multisearch with Locations Map to show search result locations in the map. How can this be done?

Right now this doesn’t work using the “auto placement” of the locations map. You can get it all working together using a custom template I’ve created a template that will do the job here:

https://gist.github.com/xnau/39afbf647d78e85a7acdba4b0da30530

You’ll need to download that template, and place it where Participants Database can find it. This is explained here:

Using Participants Database Custom Templates

Once that’s done, change your shortcode to something like this:

[pdb_list template=multisearch-map]

Support Discussions for Combo Multisearch

    • YEAH!!!!!!! I got it! Thank you so much, it works perfect now.
      – Petra

  • Hi, I bought the Combo Multisearch for a customer. Everything work fine on my Demo-Website. Now I transfer all to the customer page and the search doesn’t work anymore. Do you have any suggestions for me?

    • Can you provide a little more detail on what exactly is going wrong?

      • If you choose a branch and click on search (suchen) nothing happens. On my Testingsite it works fine. Do you have any idea what happens on the first site?

        • Are you using the [pdb_search] shortcode? You don’t need it, just use the list shortcode like this:

          [pdb_list template=multisearch]

        • Hi Roland,
          I use this shotcode on both sites:
          [pdb_list template=multisearch list_limit=0 sort=false filter="approved=yes"]
          [pdb_list template=flexbox search=false sort=false display_count=true list_limit=50 orderby="firmenname" order="asc,asc" filter="approved=yes"]

        • OK, you are using two shortcodes, one for the search and one to show the results. You can’t use the “list” shortcode that way, but you can use the “search” shortcode to show the search control in one location and the search results in another.

          Try this:

          [pdb_search template=multisearch target_instance=2 ]
          [pdb_list template=flexbox display_count=true list_limit=50 orderby="firmenname" order="asc" filter="approved=yes"]

          There are also several changes to the shortcodes that remove unneeded elements.

          Explanation of the “pdb_search” shortcode: The Search Shortcode

        • Hi Roland,
          unfortunable that doesn’t work either. I absolutly have no idea what I can do.
          – Petra

        • You can try using the multisearch responsive template:

          [pdb_list template=multisearch-responsive display_count=true list_limit=50 orderby="firmenname" order="asc" filter="approved=yes"]

          This way, you don’t use the pdb_search shortcode at all, it’s all in one shortcode.

        • Hi Roland,
          that works fine, BUT is it possible to use the flexbox Template for the list? I spent hours formatting the list like the customer want it. Now the list dont look like the first versionen anymore.
          – Petra

        • Yes, but you will need to create a custom template that combines the layout for the list of results and the multisearch controls. If you look at the pdb-list-multisearch-responsive.php template that is included in the add-on, you can see how to create your own that uses the flexbox layout.

          Using Participants Database Custom Templates

        • YEAH!!!!!!!
          I got it! Thank you so much, it works perfect now.
          – Petra

        • glad to hear it!

  • I purchased the combo-multisearch a few weeks ago and thought it was working just fine until my client keep telling that it wasn’t working. So I’d go in and change some settings, test it, and it would seem to work. I’d have the client look at it from their PC and it wouldn’t work still. So after spending hours trying to find a pattern to why it sometimes worked and other times it didn’t, I discovered a pattern. As long as I’m logged in to the WordPress admin area, it works. If I logout and then visit the page again (without closing the browser) it will still work. BUT as soon as I close the browser, reopen it to the page, it doesn’t work. Please fix this or tell me what I’m doing wrong here. Here’s the page with the issue: https://clicmeded.com/lic-programs/
    Thanks, Steve of High Tech Services

    • Hi Steve,

      These are the classic symptoms of page caching not allowing the page to update with new content. Try exempting the page from caching.

      If that doesn’t fix it, try using the Alternative php Sessions setting in the plugin settings under the advanced tab.

      • Roland,

        Excellent. As soon as I read your first suggestion about caching, I remembered that I use a plugin called WP Fastest Cache. I went there and found where I can exempt certain pages, so I exempted the main page listings that has the pdb_list code in it.

        You have saved my bacon! My client will be thrilled this is fixed. Thanks so much for your help.

        Note: I’m deleting the YouTube video I made. Perhaps you can remove that part I reference in my original comment above.

        Steve

  • Hi Roland.

    1. I have 7 websites of my own where I need to use the multi search extension with the participants database. Do I need to purchase one separate license for each?

    2. How long will the license last?

    Warm regards

    • Hi Awais,

      The license for the add-on plugins is for a single site, but it does not expire: you will receive updates to the plugins for the life of the plugin. thanks!

  • Hello!

    This add-on works perfectly, exept for the url pre-loading function. I set the url as you teach in this page but I can’t never make it work.
    Does it works only under precise circumstances?

    Thanks

    • I don’t know enough to say what the problem is. If you are asking about the Autocomplete, it only works with the “combo” search, there is not autocomplete for multi search fields.

      Autocomplete uses javascript, so if there is a javascript issue on the page, it might not work. Do you have a link to the page so I can see the problem?

      • I’m referring to the “I want to pre-load the search terms when linking to the search page. How do I do that?” question in the FAQ in this page.

        For example, if I put a url like the one you exposed (https://xnau.com/search/?city=seattle&business_type=brewpub) the list get no results

        • OK, now I get it. First, you need to use the correct field names. If you go to the Manage Database Fields page, find the fields you want to pre-load with values. Each field has a “name” which is what you will use in the URL. Now, for each of those fields you need to give it a value to preload. What can go in there will really depend on the kind of field it is. You must provide it with a value that is compatible with the type of field you want to pre-load with a value.

          Be sure that you understand the syntax of putting values in a URL.

          If the value has spaces or other special characters, you may need to encode that data…it’s called “URL encoding” and if you look it up, you’ll see how that works.

          If you’re still having trouble, give me a specific example and I’ll see if I can help further.

  • Hi!
    I just purchased the add-on. The shortcode works and the multi search is displayed, but I am having an issue with the way it looks on the website.
    I am not sure if it’s an issue with its compatibility with the theme or if it’s something I have to manually change.
    There is several line spaces between each of the search fields, a very large blank space at the top of the page, and the font doesn’t match at all with the rest of the site.
    Is there any way to make it look better?

    Thanks!

    • Hi Rachel,

      I don’t have a really good answer for this, the plugin is designed to let the theme do the styling so that it will fit into the site without much tweaking, but of course there are themes that do things differently and so you get the kind of issues you’re seeing. There isn’t any set answer to your questions other than to inspect the HTML and see what the CSS is doing, then add rules that get you what you want.

      In the case of fonts that are different, that can require a little detective work because the theme is probably using some specific selector (as opposed to a more general selector that would apply to nearly everything) to apply the font styles, and the output of the plugin doesn’t get those styles because the it’s got a different HTML structure.

      So, it’s a bit complicated, but if you know the font style the theme is using (by inspecting some text that the theme is styling) then you can just write a CSS rule that will make all the plugin out put use that style.

      The spacing is probably more easily dealt with, possibly the theme is applying some large margins to elements, so you’d write a CSS rule that overrides that in the case of the list elements.

      If you need some basic help with working with the CSS, take a look at this article: Simple CSS Techniques for WordPress

  • I’m trying to have it list out my options as checkboxes instead of drop-downs, but I cant seem to figure out how to do it. Any suggestions?

    • The multisearch will use the same type of control that the field is set to use…so if you want a field to be shown as checkboxes in the search control, the easiest way to do that is to change the field to a checkbox-type field.

      It is possible to use custom code to independently change the type of control that is used in the multisearch, not too difficult if you have some php skills.

  • Hi, purchased the plugin but unable to understand it.

    My dropdown[SPF CATEGORY] is showing like this : https://1ce.org/1#Bydj8LTeN

    I don’t want to select area i just want a dropdown. Can you please help ?

    • This is the control you will get for a “multi” type selector. It’s designed to give the user the ability to make multiple selections. If you’ve got some php skills, you can change what type of element is used to make the selection. For example:

      <?php
      add_filter( 'pdb-combo-multisearch-search_control_type', function ( $form_element, $field ) {
         if ( $field->name() === 'spf_category' ) {
            $form_element = 'dropdown';
         }
         return $form_element;
      }, 10, 2 );
      ?>

      You’ll need to alter that to fit your particular situation.

  • I’m using both the Combo Multisearch and Locations Map plugins and am trying to pre-load search terms (e.g., …/search/?category=photographers) into a search page (containing only the [pdb_list] and [pdb_listmap] shortcodes) but have had no success. The search page ignores the search and returns all listings. Any suggestions? Am I doing this wrong?

    • If you want the locations map to show the markers for the search results, you need to use a locations map that is embedded in the list. The [pdb_listmap] shortcode is for showing a stand-alone map an doesn’t respond to the search results.

      Try using the “List Display Automatic Map Placement” for the list this is in the Locations Map settings under the dynamic map tab.

  • Hello!
    I’m a newbie at wordpress and I found your plugin very useful. I just bought the combo-multisearch extension and it’s working great (I’m still learning how to use it), however I have a question, is it possible to use the pdb_total with a search result? I mean, all my records have a required numeric field, but I’d like to know if there’s a way to get the total of that field but only from those records which are the result from the search.
    English isn’t my first language so I hope my question was clear enough for you to understand.
    Thanks in advance!

    • You can’t use the “total” shortcode for this because it needs to be tied to the search result. The best way to do something like this is with a custom template, you will need to know php to do this, but it is not so simple. Do you know php?

      • Thanks for your quick answer. Sadly no, I don’t know php. I’ll try another approach to fulfill that need. Thanks anyway for your time and great support.

Got a Support Question?

You have to agree to the comment policy.