Extract dynamic values as drop-down in AEM Content Fragment Model | Community
Skip to main content
New Participant
August 7, 2024
Solved

Extract dynamic values as drop-down in AEM Content Fragment Model

  • August 7, 2024
  • 2 replies
  • 1024 views

Reqiurement:

I wanted to add a dynamic drop-down field in AEM Content Fragment Model. But while creating fragment, it need to show me the possible list of values populated in the drop-down from a back-end API.

I already exlored acs commons generic list option but that again seems to be static. In case, if there are future changes to the content fragment model, then there is a need to update generic list again.

 

Is there a possible approach to populate the JSON from API in a content fragment model?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by EstebanBustamante

Hi, 

When you said you explore the "generic-list" option are you referring to this blog? https://blogs.perficient.com/2019/09/06/dynamic-dropdowns-in-aem-content-fragments/ . This blog clearly explains how to create a dynamic dropdown, you just need to adjust the logic to bring the options from your API instead of the "generic-list".

 

Hope this helps

2 replies

kautuk_sahni
Employee
August 21, 2024

@ssridharcse Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

 

Kautuk Sahni
EstebanBustamante
EstebanBustamanteAccepted solution
New Participant
August 8, 2024

Hi, 

When you said you explore the "generic-list" option are you referring to this blog? https://blogs.perficient.com/2019/09/06/dynamic-dropdowns-in-aem-content-fragments/ . This blog clearly explains how to create a dynamic dropdown, you just need to adjust the logic to bring the options from your API instead of the "generic-list".

 

Hope this helps

Esteban Bustamante