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.

Expand the displayed values in a DropDown

Avatar

Level 2

1-21-2012 5-01-49 PM.jpg

Is there a way to expand the displayed values within a dropdown? My binded values are only 2 digits, but the descriptions far exceed my field's width. Please advise.

For reference, here is an HTML example of what I am trying to achieve:

http://easylistbox.com/demoDropDownToolTip.html

4 Replies

Avatar

Level 2

Figured out a workaround, hopefully someone can find a better solution. Essentially, change the width of the dropdown on enter, change it back on exit. See below:

ProjectBLDGtype::enter - (JavaScript, client)

this.w = "1.9375in";

ProjectBLDGtype::exit - (JavaScript, client)

this.w = "0.9375in";

Not elegant, but works.

Now I cannot figure out how to only display the bounded values instead of the both the value and description as a final output, but still displaying both when the full dropdown is displayed.

Avatar

Level 10

Hi,

That is the approach I would take. However I used the mouseEnter and mouseExit events. See page 2 of this example: http://assure.ly/ewrLMo. It also uses a non-scripted approach to what is displayed in the dropdown and the bound value (see the Object > Binding palette).

Niall

Avatar

Level 2

Thanks Niall,

I used your suggestion on the events and it works much smoother. I ended up creating a readOnly text field behind the dropdown to maintain the caption.

Since the exact field is utilized multiple locations I've populated the dropdown via JavaScript in a Script Object. My belief is that if I maintain a single list in a Script Object, I would be saving on file size when compared to maintaining multiple lists within each copy of this field.

Avatar

Level 10

Hi,

I don't think that multiple dropdown would adversely affect file size. However I would agree that using the script object will centralise the maintenance of the dropdowns.

Good luck,

Niall