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 set of selectors/checkboxes/text fields that provide 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
Combo Search provides a single-input search that will look in multiple fields for a match to a single input. Use this search type in situations where a simple easy-to-use interface is desired to search the database.
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.
The terms that are available to the autosuggest are limited by the list shortcode filter, so data from records that are prevented from getting displayed won’t show up in the suggestion list.
Configuring the Multi Search
Multi Search provides a comprehensive interface for searching on multiple fields using a separate input for each field. This is best for situations where a precise, complex search is needed (such as a technical database) or in situations where you want to show the viewer what kind of information they can search by (for example, a services directory).
Starting with version 2.0, the multisearch fields are defined in a special interface under the “Multi Search Fields” tab in the plugin’s settings. In this new interface, each field in the multisearch can be customized in several different ways, changing how it looks, how the user may interact with it, and how it finds matches. Which options are available to a field depends on the type of field it is as defined in Participants Database.
If you already had Combo Multisearch set up and are updating from an older version, your fields will still be configured as before, only now you can fine-tune how each field works.
On this page, you configure which fields will appear in the multisearch and in what order. The display shows a list of all the fields configured for the Multi Search so you can edit the parameters of each one. You can add as many fields here as you want, you can also also delete and re-order them.
Note that fields that are included in the Combo Search configuration are not available for Multi Search; remove them from Combo Search to make them available in the “Add Field” selector.
Field Parameters
Each field in the list of fields has its own parameters where you can change how it is presented or how it works. There are several parameters, and which ones are available to each field depends on the field type. Here is a description of the parameters:
- Label – This defaults to the normal field title, but if you want to give it a different label in the search interface, you can do that here.
- Help Text – defaults to the field’s help text, but you can choose a different help text for the search interface.
- Attributes – allows the addition of HTML element attributes, such as the “required” attribute to selectively make fields required in the search interface.
- Input Type – depending on the original field type, there will be several different ways the field can be shown in the search interface.
- Include Label in Result Summary – when checked, the field’s label will be shown along with the searched-for value in the search result summary.
- Database Values in Selector – for any kind of selector input type, instead of showing the configured field options, the options shown in the control will be drawn from the database.
- Show “Any” Option – for selector input types, enabling this shows an option that will match any value in the database: this is essentially a “reset” for the selector, removing it from the search. Uncheck this if you want to force the user to make a selection.
- “Any” Option Label – when the “any” option is shown, this is how it will be labeled. You can leave it blank for a blank option.
- Multiselect “Or” Mode – (only for multiselect input types) if this is checked, the search result can match any of the values selected, instead of needing to match all of them when using “filter” mode. This setting makes no difference when not using filter mode because the values will be treated as an “or” in that case anyway.
Multi Search Field Input Type
Some field types will have several options available for the “Input Type” selected in the Multi Search Fields interface. A text field can be shown as a text input (of course) but also as a dropdown selector that shows a list of values taken from the database entries. Dropdown fields can be shown as a dropdown or as a multiselect, giving the user the ability to select several possible matches for that field.
Determining Which Multi Search Fields are Shown
Normally, a list shortcode configured to show the Combo Multisearch control will show all the fields you have configured in the Multi Search Fields interface. It is possible to determine on a per-shortcode basis which fields will be shown in the interface, as explained in the “Showing the Search Control” section. If you want to do this, you must configure all the fields you will show in all shortcodes, and then use the “search_fields” attribute in the shortcode to determine which of the configured fields to show in that particular display. In other words, you cannot add a field in the shortcode that has not been added to the Multi Search Fields configuration.
Filter Search Mode
The Combo Multisearch has two general modes of operation: Filter Mode on or off. With filter mode “on,” all chosen search values must match the record’s values 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 matches the record’s values.
When filter mode is on, any multi search fields that are configured with the “multiselect or” option will only require that one of the selected values in that field is a match. With “multiselect or” deselected, all the options selected for that field in the search must match.
Each search type, combo or multi, has a “Whole Word Match Only” switch so that text searches will only match a complete word in the search, not portions of a word. For multi-search controls, this only affects text inputs where the user types in the search term.
Searching on Date Fields
“Date” type fields can be presented as a single input or as a range with two inputs.
When using a single input, the search will attempt to include all records that correspond to the entered date.
When using the ranged inputs, the range will always include the date entered for the end of the range. For example, if the range is entered as “June 1, 2020” through “June 10, 2020” records that have a date of June 10, 2020 will be included in the result.
Partial Dates Supported
When using “date” fields in multisearch, it’s possible for users to enter partial dates, such as just the year, a month and a year, or just a month. For example “2010” will return all results with dates within that year. Entries like “March 2010” would return all dates within the month of March 2010. It’s als possible to enter a month: an entry of “May” will return all records with dates that are within the month of May in the current year. Partial dates can be used with ranged searches also: for example a search of “2000” through “2010” will return all dates between 2000 and 2010, inclusive.
When using a ranged input, if one of the inputs is left blank, it is assumed to be the current date. You can override this behavior by adding “required” to the attributes setting for the date field in the multisearch fields configuration.
Returning to the Search Results
Under the General settings tab is an option 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 Combo Multi-Search Control
The Combo Multisearch Add-On provides its 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 ]
If you are using the pdb_search shortcode, be sure to read Using the Search Shortcode as it can be tricky to configure.
It is possible to define the list of multisearch fields to search in the shortcode, drawn from the list of fields configured in the mutisearch fields setup. For example:
[pdb_list template=multisearch search_fields='company,city,state']
If you have both combo and multi searches configured, the combo search will only show if “combo_search” is included in the field list.
If you want a particular shortcode to show the combo search only, you can set that up like this:
[pdb_list template=multisearch search_fields='combo_search']
It is not possible to determine which fields are included in the combo search in the shortcode due to search optimization.
Setting Up a Remote Search
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. (Check this page for more on using the search shortcode…) 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]
I've got a very large database, are there any problems with this plugin with large databases?
Mostly, the size of the database is not going to matter at all, MySQL is pretty efficient with large databases.
There is one setting that will be affected, that’s the “Autocomplete” feature of the Combo search. For a very large database, you could get some memory errors with this feature. Two things you can try for that problem: limit the number of of fields that are going into the autocomplete (using the “Combo Search Autocomplete Fields” setting) which will cut down on the number of terms loaded into the autosuggest. Second, if your database is realy, really large, you may need to turn autocomplete off altogether.
If you are concerned with database performance issues, it’s a good idea to tune your server for better performance. You may want to ask your web hosting provider about that, it is a fairly technical subject and requires server configurations you may not have access to.
A few days ago I discovered that on our search page, for a field defined as Multiselect/Other, there was suddenly nothing displayed but the Title – the checkboxes that had always been there were gone. It turned out that under Multi Search Settings, the field’s Input Type (which I hadn’t touched) had been mysteriously changed to Dropdown List. The problem on my search page was easily solved by correcting the Input Type to Multiselect Checkbox, but I wanted to bring to your attention this unexpected glitch.
Thank you Susan,
Thanks for your report! We issued a major update to the Multi search configuration interface several weeks ago which added several new configuration options. I attempted to warn users with a pop-up message that there might be a display change for some. I’m sorry about the unexpected change, but it was unavoidable in some cases.
–Roland
Hi Roland,
I have unexpected behaviours of the clear button in the search (first one is giving the opposite of what I’d expect, the 2 others are more nice to have):
-for the checkbox, clicking on clear is actually checking it
-for the radio buttons, clicking on clear is clearing all option instead of selecting back the “Any” one
-for the multiselect checkbox, clicking on clear is clearing all option instead of selecting back the “Any” one
Thanks,
Clément.
What is the option configuration of the checkbox field? I’m not seeing this problem here.
The checkboxes and radio buttons is an issue I’m planning to address…it’s functionally the same as it effectively removes the field from the search by deselecting everything, but it would be nice to have the “any” input selected if it exists.
Interesting, I didn’t configure anything special.
In Database field: checkbox, help text: yes, options: yes, validation: not required, sign up, csv and sortable are checked.
In multisearch, filter mode: on, multisearch settings: only alphabetical is checked, min search term: 1
I have deactivate my child theme and put the standard [pdb_list template=multisearch ] but I still have the same problem.
I pushed out an update yesterday that should fix the problem.
The update didn’t fix it for me unfortunately. I deactivated all my plugins except the multi-search and the participants database, changed to a different theme, but it still didn’t fix it. I’ll check if I can find something else tomorrow.
Make sure you’ve cleared caches. The changes are in the javascript which is usually cached. If you’re still having problems, let me know what you are seeing. The problems you described before have been fixed in my tests.
I cleared cache on browser, wp and server, it didn’t help.
I deleted the plugins and set them up again until I could repeat the issue. Good news is that I found it :)
The problem arise when I add a dropdown list filter in the multisearch field settings and check the “show any” option. If this one is the last one in the settings, there is no issue when clicking on clear, but if there is another item after it, it will behave differently.
For example, I tried the following order for the search fields:
Checkbox A
Dropdown list with any option checked
Checkbox B
If I click on clear, it will behave normally for checkbox A, but select option B.
Thanks for checking into this more deeply. I have not been able to duplicate the problem here. I tried to do it as you did it, tried several variations but it’s working as expected. Maybe if you could send me a link I’d be able to know the specific setup where the problem comes up.
sure, it is on this page:
https://mytriworld.com/find-a-triathlon-race/
It looks like I need to make the neweset release available, I thought it had been updated already. Look for version 2.2.4 to fix these issues.
one more thing that I just realized now, when I click on “clear” on the search part of the page, it is also clearing the sign up portion which a bit below. Maybe it helps to understand where the issue is.
Clément
It works perfectly now, thanks a lot! I see you also added the back to “any” clearing. Awesome :)
Hi Roland,
I have a radio button search field which can give me 5 results: “Sprint”, “Super Sprint”, “olympic”, “full”, “half” or all of them with the any selector.
My issue is that both “super sprint” and “sprint” are giving me the same results. I have checked and unchecked the “Whole Word Match Only” option in multi search settings but it doesn’t change anything.
Thanks,
Clément.
let me check into this, look for an update to Combo Multisearch that should help with this.
Perfect, it works now.
Thanks a lot.
Clément.
Hi,
After the purchase, I’ve played with the Multi-search mode for a small database of 20 something records. One of the fields there has values of “0(Lace), 1(Superfine), 2(Fine), 3(Light), 4(Medium), 5(Bulky), 6(Super Bulky), 7(Jumbo)” and only for this particular field the search doesn’t seem to be working.
For instance, I have 3 records which has a value of “2(Fine)” for the field and 4 records containing “4(Medium)” but selecting either of these in my search form doesn’t give any matching records. Search for all the other fields works well except for this field. Any idea how to resolve this?
It looks like there is a bug that prevents matching terms with parentheses. I will need to issue an update to fix this, I’m sorry.
I’ve issued an update to Combo Multisearch that will help with this problem.
Thanks, Roland, for a quick release of this bug fix. I updated the plugin and the search is working fine now.
I have Combo Multisearch set up with “Remember the Last Search”. I recently noted just before updating to the latest version that rather than seeing one of my search words reappearing, I saw what must have been someone elses search word that had been used to look for a mythical creature. I was using MS Edge at the time, rather than my ususual FireFox. I am assuming that you would not expect this.
Sorry, the link is here:
https://www.gowerbonecaves.org.uk/gazetteer
As we’ve seen before on your site, sessions are not working. As long as that is not working, you will see issues. My guess is that sessions are probably working in general, but there is some kind of caching going on that is preventing the session cookie from working, or maybe cookies are blocked.
Ahh. That pain again. Thanks for your patience on this one
Roland, I sent you an email with some screenshots.
re 2.1.10 and earlier, thanks for incorporating the functionality that we previously were getting via the special plugin you did for us – Plugin = PDB Multi Field as OR in Filter Search
I have deleted the plugin, so we are only using the combo plugin.
The multiselect OR mode tickbox is not having any impact for us. Either checked or not checked, I am getting the OR functionality within the field … which is what we want … so not really complaining … just pointing out that it is not working as expected .. but could this be a hangover from the special that we were using before.
The “Multiselct OR” setting really only affects things when using “filter mode” in Combo Multisearch.
that’s how we have it set – filter mode enabled.
OK, so what is the problem you’re seeing?
The plugin works for some minutes, but then I get a server overload (503). Disabling the plugin fixes the 503-error, but I would love to be able to use it. Any ideas?
What is the specific action you are taking to cause the error?
Generally speaking, something like this needs to be looked at by your web host. This is not a problem I’ve seen before, so I don’t have any specific recommendation for how to address it.
I tried both with Gutenberg and Classic editor. I don’t know if it is related to the 503-message, but now I got this via e-mail from my WordPress installation:
An E_ERROR appeared in line 151 in the file /home/slektbqe/public_html/wp-content/plugins/pdb-combo-multisearch/pdbcms/Search/Autosuggest.php. Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 67108872 bytes)
How many fields you have assigned to the Combo Search and how many records do you have? You may have gone over what your system can handle in setting up the autocomplete. Cut down on the fields that are going in to the autocomplete, especially don’t include fields that have a lot of data, such as text area fields. There is a setting “Combo Search Autocomplete Fields” where you can determine which fields are used.
This sounds correct, when I add a filter to the shortcode so that only part of the database is searched, everything is fine. Unfortunately enabling the combo-plugin also creates error on the native search. The native (simple) search does handle the large database.
I currently have 10 million records and 24 fields. Do you know any other systems that might handle a database of this and larger sizes?
Correction: Now it has stopped showing the search-function all together if the combo-plugin is activated, even though I use a filter in the shortcode.
[pdb_list filter="kilde=Bilboka 1922" template=multisearch-responsive search_fields='first_name,mellomnavn,last_name,registreringsnummer,art,hestekrefter,fabrikk']
Bilboka 1922 only contains 4 records.
If you are using Combo Search, you cannot set the search fields in the shortcode, I suggest you remove the “search_fields” attribute in the shortcode and do all your configuration in the Combo Multisearch settings.
Second, I’d like to hear about any changes you are trying with the configuration of the Autocomplete, I suspect that is causing problems in your case. I suggest you limit the fields that are included by using the “Combo Search Autocomplete Fields” setting.
I did the things you wanted, but you are correct that the Combo-plugin doesn’t handle the amount of records I need it for. I currently have 1,3 million records. When I disable the plugin, the Participants Database works as normal, even with the high amount of records.
Could you please issue a refund?
I’m happy to issue a refund, but I’m certain the plugin will work with some changes to the configuration. First, you can disable autocomplete. If you really want autocomplete, you can pare it down by limiting the fields that are included in the autocomplete list. Another possibility is to increase the memory limit for php. The autocomplete list is cached, so the performance hit of putting together a list of several hundred thousand entries should be tolerable.
I would love for it to work :-)
I have disabled autocomplete.
I increased the memory limit from 1024M to 2G, which is max. That made the trick and I can now do a search with combo, even though there are more than 1,3 million records.
But I do have one concern. What will happen when I reach 10 million or 100 million records? I can’t increase the memory limit any more according to the php.ini settings in Cpanel.
The only reason you’d need to increase the memory is if you are using the autocomplete feature. If that is off, you won’t have any additional memory needs with a larger db.
Hi again, sorry for the late reply I just need to test more records before answering you.
Memory_limit is still 2G and Autosuggest is off.
The total amount of records in now close to 3 million
Now both the combo-plugin and the Participants Database-plugin have failed to function. I can’t save the pages that I store the shortcodes in, even if settings and shortcodes are at a minimum.
3 million and more might be a lot to ask of the plugin? Like I said, my database could end up with as much as xxx million records.
So do you have any specific on the reason for the failure? As far as I know the plugins are generally scalable, meaning that the number of records won’t affect functionality, however there is always something new to learn. If you could give me the specifics on how it’s failing, that would help. I don’t have the ability to test a database of that size here.
It’s also worth noting that a database of this size would require your server to be configured for more efficiency, I would suggest you contact your web host about optimizing your server.
Hi,
I bought the combo multisearch just to add a filter button to select items from a state. It works fine but I cannot understand how to display the search and clear buttons left aligned. I’ve tried to modify combo-multisearch.css (submit controls – margin left) but nothing change. Can you please help me?
Gabriele
I don’t recommend you edit plugin files directly., these changes will be lost when you update the plugin. The best way to modify the CSS you are using is to add new rules that override the existing rules. There is a setting on Participants Database under the Custom CSS tab where you can place your rules.
I can’t give you the rules to use, I don’t know what the situation is on your site, but one thing to try if you want the buttons on the left is something like this:
.submit-controls {
margin-left: 0;
}
That may work, you’ll probably have to try different things to see what works in your case…sorry I can’t be more specific. Using your browser developer tools will help you see what the CSS is doing with those elements.
The Combo Multi Search has worked great for us, so long as we defined the Options value for our checkbox fields as null_select::false. However, we recently discovered that all the checkbox fields on our Search page were being displayed as radio buttons with a value of 1, and once they were clicked, couldn’t be unclicked.
Under Manage Database Fields, we discovered that our old Options value of null_select::false had been replaced by 1. However, restoring our old value only succeeded in eliminating the radio buttons; it didn’t bring back the checkboxes. We then tried changing the Options value to a space, which created a checkbox on the screen, but (1) it was located to the right of the Title, (2) had a value of null_select next to it, and (3) when checked, produced an inaccurate result (“No Records Found”). Is there anything we can do on our end to fix this issue?
The page is at https://sjpc.org/casptest/pdb-list-responsive/ and it is invoked via
. The PDB plugins and WordPress core are at the latest versions.
Check the configuration of the field in the Combo Multisearch settings under the Multi Search Fields tab. Make sure it’s configured the way you want it.
What is the form element type setting for the field on the Manage Database fields page?
In the Combo Multisearch settings under the Multi Search Fields tab, Checkbox fields have only the Label and Help Text fields populated.
The form element type setting for these fields on the Manage Database fields page is Checkbox.
It looks like there is a problem with the multisearch when displaying checkbox and radio button fields. Thanks for bringing this to my attention, I will be releasing an update to the plugin soon.
Version 2.19 solved the problem–thank you!