Change Placeholder Text in Header Search Bar

SuburbanGringo
Tera Contributor

Hello,

 

I am attempting to update the placeholder text in the search bar on the Employee Center Header. 

SuburbanGringo_0-1725548717969.png

 

We would like to change it from just "Search" to something more user friendly ("How can we help?", etc.). Can someone please point me in the right direction to update this text?

 

Thank you

14 REPLIES 14

Rob Sestito
Mega Sage

Hello @SuburbanGringo - 

You should be able to do this by changing the typeAheadOptions.title = gs.GetMessage() within the Server Script, that is in the widget itself. Depending on which is being used as the header is controlled by a widget.

 

For example (from my PDI):

My portal is Employee Center --> which is using EC Theme --> which is using Header | Footer Employee Center Header --> and from within the Server Script you should have the typeAheadOptions.title

 

Here is how I changed my quickly just to show:

RobSestito_1-1725568925709.png

 

From the portal view:

RobSestito_2-1725568947511.png

 

Keep in mind, when you change this and give your portal a URL Refresh, you will probably be hit with some Restricted Caller Access messages. Once you go and change those to Allow from the Restricted Caller Access table, you should be all set.

 

You could also create a new System UI Message key and point the server script "typeaheadoptions.tite" to your new one. That way, you can create translations if you ever need.

 

Hope this helps!

Reach out with any issues - 

-Rob

 

 

Srinivasa Chall
Tera Contributor

Hi @Rob Sestito 

How to change the font/styling of the placeholder text. Any idea?

Hello @Srinivasa Chall - 


Yes, you can do this. You can create CSS for page specific, or, to keep your portal consistent across all pages, create a new CSS Include for your portal.

 

Here is what I did for my PDI:

  • Navigate to your portal list and select your portal being used
  • Click into your portal Theme being used and open that record
  • Scroll down to the related tab and click on CSS Includes
  • Click New

RobSestito_5-1726670933873.png

 

RobSestito_6-1726670985953.png

Give the CSS Include record a name, and for now,  pretend I have no Style Sheet yet (covered part with red marker) - click the magnifying class next to Style Sheet, and then click New

 

Name the Style Sheet how you see fit, and then give it the CSS you want/need:

RobSestito_7-1726671098860.png

Here is mine as an example:

.input-typeahead {
    color: red !important;
    font-family: "Arial", sans-serif; /* Change to any font you prefer */
    font-size: 16px; /* Adjust font size */
    font-weight: bold; /* Set the font weight */
}

.input-typeahead::placeholder {
    color: black;
    font-family: "Arial", sans-serif; /* Change font for placeholder */
    font-size: 14px; /* Adjust placeholder font size */
    font-style: italic; /* Example of adding font style to placeholder */
}

 

Now my typeAhead will be changed in the search boxes for the whole portal:

(Showing a few pages throughout the portal)

 

RobSestito_8-1726671177460.png

 

RobSestito_9-1726671190856.png

 

RobSestito_10-1726671231618.png

 

RobSestito_11-1726671248143.png

 

Hope this helps - reach out with additional questions and I can try to help more.

Cheers,

-Rob

Thank you so much for the detailed explanation @Rob Sestito . I tried your solution but somehow it doesn't work in my case (may be the styling in one of the existing stylesheets is conflicting). I am unable to find the input-typeahead class when I inspect the search element. I am still troubleshooting it as we speak. We are using AI search on the Portal. Do you think that makes a difference?