Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Populate second drop-down on the basis of value selected in First Dropdown

Avatar

Avatar
Level 1
Veenu
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Veenu
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
View profile
Veenu
Level 1

11-08-2020

I've requirement to populate second drop down on the basis of value selected in first dropdown.

The catch here is list for both the drop-down is dynamic, I've to fetch it from back-end.

I need to implement this in AEM component.

Kindly suggest @Arun_Patidar  @Veena_Vikram @Theo_Pendle 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 1
Level 1
HalehHaerian
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
HalehHaerian
Level 1

Likes

2 likes

Total Posts

1 post

Correct Reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile
HalehHaerian
Level 1

11-08-2020

As @Arun_Patidar  mentioned, you should use the json and fill the drop down list.

You can get help of this page as well.
https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/coral-ui/c... .
This Dynamic drop down List will not save the previous selected value by reopening the dialog box. If you want to save it you should use “.selecteditem” as you see in the link which I attached.

 

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,282 likes

Total Posts

3,156 posts

Correct Reply

891 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,282 likes

Total Posts

3,156 posts

Correct Reply

891 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

11-08-2020

You can create the first dropdown as dynamic based on datasource. Second dropdown you have to populate based on on select event of option of first dropdown.

 

Long back I created a POC solution where second dropdown populated with the children pages based on selected page in first dropdown(pathbrowser in my example)

https://github.com/arunpatidar02/aem63app-repo/blob/master/js/dynamic-dropdown.js

 

@HalehHaerian  could you please guide here as you adapted this solution for dropdowns.