Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Headers in Dropdown lists? (Non-selectable items)

Avatar

Former Community Member
Does any one know how to make headers in dropdown lists? I have 2 groups of items I want to add a header for each in the dropdown list. The headers just have to be non selectable.



thanks,
5 Replies

Avatar

Former Community Member
I do not believe that we support that feature.

Avatar

Former Community Member
Is there a way to change the background color of certain items so it looks visually different? or make the font color?



Thanks,

Avatar

Former Community Member
Hi Kris,



In Designer 7.1, I created a DropDown List which includes Headers and sub categories under these headers, where the Headers are not selectable. When I built my DropDownList I then assigned Values to each item in the list, which I've put in brackets for you:



HEADER ONE (10)

Item A (1)

Item B (2)

Item C (3)

HEADER TWO (11)

Item X (4)

Item Y (5)

Item Z (6)



This is the JavaScript I wrote on the Exit event:



if (DropDownList.rawValue > 10) {

DropDownList.rawValue = "";

}



Hopes this works for you.

Avatar

Former Community Member
Hi Helen,



I see what you mean. You made no action to them right? Do you know of a way to formath them differently? bold the header, change the background color, etc.?



Thank you,

Avatar

Former Community Member
Hi Kris, correct, there is no action on the Headers with a value of 10 or higher. I've tried a number of things, but it appears you cannot format them (bold, color, etc.). That is why I put my Headers in all caps, and then under the list I added a couple of spaces before each item to make it appear as a list. I even used dashes in front of the items (- Row A, - Row B, etc.) and then on a change event had in change to Row A, Row B, etc.