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.

Dropdown-List Option affects the choice of the other Dropdown-List Contents

Avatar

Former Community Member
Dear community,



i am stucked here with the following problem: I have to design a form in which the applicant has to choose his country in the first dropdown list. In the second dropdown list(which results from the choice of the country) he can choose his homeland university.



The first dropdown-list works as a filter, so that the second dropdown-listonly only depicts universities according to the chosen country.



How do I do that?



I really appreciate your help and thank you very much in advance.



Hazuki
5 Replies

Avatar

Level 7
Have you looked at using the "change event" to clear the second drop down list box and then based on the selection made add the desired items to the second drop down list box.

Avatar

Former Community Member
Geo,



I have a similar problem can you give an example of how to use the "change event" to accomplish Hazuki's task. Thank you!

Avatar

Former Community Member
I am sorry that my response comes in so late. It is because I am working for my university once per week. At home since I haven't had internet connection yet, I couldn't check my mails.



@Geo:



I tried to find the "change event" option, but I couldn't find it. Or is it rather a Java Script?



Thank you very much for your fast response!

Avatar

Former Community Member
Javascript yes. Pretty much like this:



list.clearItems();

if(countryList.rawValue == "Sweden")

{

list.addItem("Sunshine");

list.addItem("Summer");

}

else

{

list.addItem("The rest of the world has bad weather");

}

Avatar

Former Community Member
@Sture: Thank you very much for you help. I will try that. By the way are the maybe other ways to get the same effect besides Javascript?



Thanks!