Placeholder Text on Search

Taylor Wirth
Tera Expert

Hello! Does anyone know how to change the placeholder text color for the default search widget? I have tried updating my Theme, injecting CSS into the widget, everything... any guidance would really help. Thanks!

app_store_learnv2_serviceportal_tokyo_introtoserviceportal_images_servicenow_sp_defaultlandingpage.png

 

 

14 REPLIES 14

I have not touched the Portal configuration. I followed steps listed above on a brand new instance. In the screen capture is my new Homepage Widget displayed on the ec_dashboard page. The font color is set to Red. 

@Taylor Wirth,

1.in page designer, select the widget and give the properties like title and place holder and check whether they are reflecting or not.

 

2. In the custom home page search widget server script, observe the widget names (ID). I missed an 'a' when I tried, It became TypeHead instead of TypeaHead. Please observe closely.

 

Thanks,

Anvesh

Thanks,
Anvesh

@AnveshKumar M 

1. Yes this works as expected

2. I copy and pasted the ID originally. I even tried hard coding the widget reference (widget tags) in the HTML body and receive the same result. I am convinced there is a Theme element overriding this CSS. The one alteration is I made a Clone of the OOTB Theme and changed a few colors to match my customer's requirements.

@Taylor Wirth ,

Might be!

Try reverting the changes which are intended to make the place holder color change using theme. Let me know if I could be of any help.

 

Thanks,

Anvesh

Thanks,
Anvesh

shivanki2
Tera Contributor

I updated the theme of the portal following the article below, and it worked.

1. Login to the instance and navigate to the theme being used in the PORTAL
2. In the CSS variable field, Add the below code snippet

sn-search-combobox {
--now-color_text--tertiary: blue !important;
}

3. Save the Theme to see the changes.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1648626