Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Adding placeholder for dropdown using templates.html

Avatar

Level 7

Hi Team,

I have a component folder structure like below.

JakeCham_0-1639739179331.png

There is a drop down inside component and I want to get the dropdowns title as Test A as shown in the picture. I was able to get the component name as a place holder. But is this possible ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @JakeCham ,

 

For dropdown placeholders, you can use emptyText property in granite/ui/components/coral/foundation/form/select node.

 

https://www.adobe.io/experience-manager/reference-materials/6-4/granite-ui/api/jcr_root/libs/granite... 

 

I don't think templates.html can be used for it since dropdown is a part of cq:dialog. If you need any dynamic placeholders for dropdown try using JS.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @JakeCham ,

 

For dropdown placeholders, you can use emptyText property in granite/ui/components/coral/foundation/form/select node.

 

https://www.adobe.io/experience-manager/reference-materials/6-4/granite-ui/api/jcr_root/libs/granite... 

 

I don't think templates.html can be used for it since dropdown is a part of cq:dialog. If you need any dynamic placeholders for dropdown try using JS.