Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Drop-down lists

Avatar

Former Community Member

My situation, I have 2 dropdown lists on a form. Let's say dropdown #1 contains 4 options. I want dropdown #2 to give me a specific set of items to choose from depending on my choice in dropdown #1.

Any help is much appreciated.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Yes, exactly the same process. Copy the script from 1 into 2 and amend the references (or duplicate the first drop down and amend the references).

You may want to add in an extra line of javascript in the first drop down object, which would also clear any previously selected choice in dropdown3. 

Good luck,

N.

View solution in original post

3 Replies

Avatar

Level 10

Hi,

There is javascript for drop down lists .clearItems(); and .addItem("a choice");

The sample shows an example of this in the change event of the dropDown1.

Hope that helps,

N.

Avatar

Former Community Member

That does help, now if I want to make the choice from dropdown 2 to effect the options in dropdown 3, I assume that this will work the same way?

Thanks.

Avatar

Correct answer by
Level 10

Yes, exactly the same process. Copy the script from 1 into 2 and amend the references (or duplicate the first drop down and amend the references).

You may want to add in an extra line of javascript in the first drop down object, which would also clear any previously selected choice in dropdown3. 

Good luck,

N.