Smart search box label text question

Heather Aluma asked on May 14, 2021 13:48

I want to add a label to search form on our site to make it more accessible. On a page template there is a web component that is a smart search box. I notice that when I go to configure it, that the "Search label text" field is empty. Will adding a label there, address that issue?

Recent Answers


Jake Kula answered on May 14, 2021 15:21

Hi Heather,

Sounds like you're on the right track. Yes, you can add text in this field. You will also need to ensure that you have ticked the "show search label" option. The label will then appear.

0 votesVote for this answer Mark as a Correct answer

Heather Aluma answered on May 14, 2021 16:51

Thank you. I see that option that you are referring to. My thinking is that I will want to match this label to the ID of the text that is entered in the search field. Is that that case? If so, where would be the best place to find that ID? There are two places that I am looking at for this, one is the cms:CMSTextBox ID under the layout tab. The second is in the search box settings within the code that we have in the "Search results page URL" field.

0 votesVote for this answer Mark as a Correct answer

Jake Kula answered on May 15, 2021 01:20 (last edited on May 15, 2021 01:21)

Hi Heather,

It sounds like you might be trying to target the source code of the Smart Searchbox web part. If so, it would be best to clone this web part and then review the source code in Visual Studio. You'll get an understanding of how it work and what IDs relate to which controls.

For your reference, the IDs are:

lblSearch (the label)

txtWord (the search textbox)

You can review the original source code below, but I would strongly recommend cloning the web part if you're planning on making any changes:

\CMS\CMSWebParts\SmartSearch\SearchBox.ascx

\CMS\CMSWebParts\SmartSearch\SearchBox.ascx.cs

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.