Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Adding placeholder for dropdown using templates.html

Avatar

Level 5

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.