SharePoint Search Refiners – Multi select


I had to fulfill a requirement wherein my client wanted Multi select refinement items in the search results page.

By default SharePoint has single selection enabled like below:



When the requirement was given, my first though was to write a JQuery script to enumerate all the refiners & construct my own checkbox list. THAT IS A BIG MISTAKE. When it comes to SharePoint we are not sure what comes OOB, so it is always better to google\bing it first.

Step 1:

Edit the page & then click the Edit web part link of the Refiners web part


Step 2:

Now the web part properties window, click the Choose Refiners buttons.


Here choose the refiner for which Multi-Select is needed and change the “Display Template” as shown below “Multi-Select Refinement Item” then click OK


Step 3:

Click OK & then save- > publish the page

Final output:

singlerefiner –> final


All the refinement related styles that you see above are custom written & SP doesn’t render them like this.

Additional stuff:

The working code (except the applying the refiners part) is listed below, so that at least no other person will waste their time on this. 🙂

$(document).ready(function () {


ExecuteOrDelayUntilScriptLoaded(CollapseAllRefinerSections, “ajaxtoolkit.js”); ExecuteOrDelayUntilScriptLoaded(EnumerateAllRefinerNames, “sp.datetimeutil.js”);




function CollapseAllRefinerSections() {


$(“”).each(function () {


$(this).parent().click(); });




function EnumerateAllRefinerNames() {


$(“”).each(function () {


var refHeadingName = $(this).parents(“.ms-ref-refiner”).children().find(“”).text().trim();


var newHTML = “”;


$(this).children().find(“.ms-ref-name”).each(function () {


var refName = $(this).text().trim();


var refCount = $(this).next().text().trim();


newHTML += ” + ‘ ‘ + ” + refName + ‘ ‘ + refCount + ” + ‘

‘; });

//Buttons newHTML += ” + ‘‘ + ‘APPLY ‘ + ‘‘ + ‘CLEAR‘ + ”;


newHTML += “”;




//Removes all existing selected\unselected\unlisted


//$(this).parent().html(newHTML); });



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s