Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

A List Box & Text Field Combo. Does it allow more than one choice?

Avatar

Level 3
Hi,



I have ListBox1 & TextField1.

Does anyone know the javascript which allows more than one choice to populate into the TextField1 ?



Example:



ListBox1:

Dog

Cat

Mouse



I choose all three and



TextField1: (shows)

Dog

Cat

Mouse



Right now it only shows one at a time.



Thank you for any help.

Arnold Love
2 Replies

Avatar

Former Community Member
Just tried it here. On the exit event of the ListBox I used this javascript:



TextField1.rawValue = this.rawValue



The selected values will come out with carriage returns at the end. Make sure teh textfield is set for multi-line.