I made look up search with lightning:inputField.

search is available, but I want to change its placeholder.

look up search field

I mean that I want to set some text instead of '001'.

<lightning:inputField fieldName="SAMPLEOBJECT__c" value="{!v.SearchResult}" aura:id="lookup"/>

I tried component.find('lookup').get("v.value") and component.get("v.SearchResult"), but both of these returns id of items.

Is it possible?

1 Answer 1


It seems impossible to change the text of placeholder. @jayanta Das has answered here why you can't: Set custom placeholder in lightning:recordEditForm

Apart from that, I tried changing it using CSS. But it seems it allows me to change the style of placeholder text but the text itself.

.THIS ::placeholder {
    content:'replacement string';
.THIS :placeholder-shown{
    content:'replacement string';
  • Hmm, I wanted to change the placeholder of "search result", but not "search field". But it seems difficult…
    – Hayato
    Oct 1, 2019 at 0:56
  • I was trying to use design token overrides, this is much much easier. Thank you!
    – Shanerk
    Aug 4, 2020 at 20:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .