1

Basically, I am trying to edit the value of the search input on SharePoint Online. Instead of showing OOTB value "Search this site", I would like to show a custom text.

I have found multiple articles on how to achieve this on a SharePoint On Premises solution, but these solutions don't seem to be feasible using SharePoint Online, as they require editing property ServerInitialRender inside SearchArea.xml, as described here

Any advice?

2

One OOTB method is to configure the search navigation in the site settings (Site Settings > Search Settings). Create a search link, and the search input value becomes "Search ". For example, these are my search links:

enter image description here

The first item is 'Everything', so it'll be the default value shown when the page is loaded (the rest are available via drop down). Se my search input:

enter image description here

And drop down:

enter image description here

Not the most ideal solution, but it's something.

1

Go into design manager under site settings>look and feel.

Go to 3. Upload Design Files. Map the displayed URL to a network drive.

Go into the mapped drive and open design templates>search and open the file called 'Control_SearchBox' (The HTML file, not the .JS) in notepad, or whatever you prefer for editing HTML.

On line 24 the value for the prompt is listed after an = sign. Replace the text there with your desired text, enclose with quotation marks.

  • I tried this solution but didn't work. I believe I also need to edit property ServerInitialRender inside SearchArea.xml, but I haven't found this file yet. – Gonzalo Jul 11 '14 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.