In this article, we will see how to customize the Search Box web part where your SharePoint search is done. The Search Box Web Part is used in the home page in the search center and in all the search results pages, like people results, results, and video results pages. Step 1Create a new site collection “My Search” and choose the Site template as Enterprise Search Center.Step 2By default, the site result page looks like this. Suppose you want to add watermark text as “SearchHere” in the Search Box highlighted below.Step 3Go to the Site Settings and select the Master Page and Page Layouts sections.Step 4Select the Display Templates and look for the file name “Control_Searchbox.html”.Step 5Replace the value for the prompt variable with the text that you want to display. Enclose the text in quotation marks. The following screenshot shows how I changed this in my Search Center scenario.Step 6Upload “Control_Searchbox.html “back to the Master Page Gallery.Step 7The changes are reflected in the Search Box web part as highlighted below.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: