Remove Search box from Site pages

Greetz!

We are using 2013 Enterprise and I would like to remove the Search input box from all of our pages. We do not currently use search in our rollout so don't want users expecting to be able use the search service. We do not have Search setup.

T

March 27th, 2015 3:18pm

You will need to hide/remove it from your masterpages (Site and System) to reflect on all pages. I would recommend hide (easier when you change your mind later).

CSS to just hide the Search box:

#searchInputBox {
    display:none;
}

I would also recommend to add this css to your custom css file and then reference it in your masterpages, rather that add it it inline using SP Designer.

Also, you can hide the control directly by making the change to the div tag itself.

Search for <div id="searchInputBox"> and modify it to <div id="searchInputBox" style="display:none;">

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 3:32pm

Well, I've tried several permutations of this but to no avail. The entire element as seen rendered in IE Developer is below.

I have put the css on my customized Seattle.html page (can't edit the .master!) at the top of the page right before the closing head tag like so:

<style type="text/css">
#ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sboxdiv {
    display:none;
</style>

I also tried using the #searchInputBox but no love. I am publishing a major version of the masterpage after each edit and then refreshing the browser.

<div class="ms-srch-sb ms-srch-sb-border" id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sboxdiv"><input title="Search this site" class="ms-textSmall ms-srch-sb-prompt ms-helperText" id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sbox" accesskey="S" onkeydown="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr');ctl.activateDefaultQuerySuggestionBehavior();})" onkeypress="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {if (Srch.U.isEnterKey(String.fromCharCode(event.keyCode))) {$find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr').search($get('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sbox').value);return Srch.U.cancelEvent(event);}})" onfocus="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr');ctl.hidePrompt();ctl.setBorder(true);})" onblur="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr'); if (ctl){ ctl.showPrompt(); ctl.setBorder(false);}})" type="text" maxlength="2048" value="Search this site" autocomplete="off" autocorrect="off"><a title="Search" class="ms-srch-sb-searchLink" id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_SearchLink" onclick="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {$find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr').search($get('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sbox').value);})" href="javascript: {}"><img class="ms-srch-sb-searchImg" id="searchImg" alt="Search" src="/_layouts/15/images/searchresultui.png?rev=23"></a><div class="ms-qSuggest-container ms-shadow" id="AutoCompContainer"><div id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_AutoCompList"></div></div></div>

March 27th, 2015 9:08pm

I opened the master html page in spd and add the style="dispay:none;" to the searchInput and it worked as advertised. So simple even a caveman could do it. I guess I'm still evolving.
Free Windows Admin Tool Kit Click here and download it now
March 28th, 2015 12:17pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics