Expand my Community achievements bar.

SOLVED

[AEM 6.6] Default value on CF dropdown.

Avatar

Level 4

Is there an easy way to select a default value for a CF dropdown?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Jeanmaradiaga, I think this is not possible from UI, however because dropdown in CF is represented by granite/ui/components/coral/foundation/form/select, you can simply change emptyOption property value from true to false. Thanks to that your dropdown will initially show first option from list instead of empty one. Below you can see what result you can expect.

dropdown-without-empty-option.png

cf-dropdown-crx.jpg

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Jeanmaradiaga, I think this is not possible from UI, however because dropdown in CF is represented by granite/ui/components/coral/foundation/form/select, you can simply change emptyOption property value from true to false. Thanks to that your dropdown will initially show first option from list instead of empty one. Below you can see what result you can expect.

dropdown-without-empty-option.png

cf-dropdown-crx.jpg