Follow Us:
I recently wanted to change the default text that appears in all search boxes. By default it shows “Search this site…” and I wanted it to be a little more customized to our environment. It turns out this is very simple to accomplish, and no code! We just need to edit 2 XML files.
We need to edit the SearchArea.xml files in 2 features to make this work in the 14 hive. They are located at:
First, be a good safe SharePoint administrator by making a backup copy of each file before you change anything. Once you do, edit the Searcharea.xml so we can add a property to make the magic happen. After the last <Property> tag above <Control>, insert a new line, and insert the following:
<Property Name="QueryPromptString">Your Desired Text</Property>
Where Your Desired Text is obviously the text you want it to say inside the search box. Like this:
Do the same in the other feature directory and save. Now you have to do an IISRESET and then take a look at your work. Basically what we are doing is overriding the delegate control SmallSearchInputBox. This delegate control is loaded in the master page at:
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
This delegate control then gets its definitions from the XML files above. If you wanted ensure that this wasn’t overwritten by a service pack or CU update, you could create a new control using Visual Studio and use a lower sequence number which is defined in the XML definition.
Great blog.
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
Request Download
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.