How to create a static list for Form option component | Community
Skip to main content
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 arunpatidar

Ho did you created the list in repo?
You have to create as a child of a node which you are browsing in the dialog?

https://github.com/adobe/aem-core-wcm-components/blob/3453838f52ab2ec2b5fe6052d7b1a9ab24404e3e/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/form/OptionsImpl.java#L183

 

 

5 replies

ChitraMadan
Community Advisor
Community Advisor
August 28, 2020

Hi @johns56194565 ,

 

Are you trying to find an example of populating a drop down using data source?

johns56194565
Level 2
August 30, 2020
Hi @ChitrMadan thanks for response too. I am not looking for data source but I am trying to use form option component on my page which has option to choose source as static list which exist in JCR. I want to understand how the list is created that I can use as source. Please refer to the doc I shared : https://docs.adobe.com/content/help/en/experience-manager-core-components/using/components/forms/form-options.html it has an option to keep list in source.
Theo_Pendle
Level 8
August 29, 2020

Hi @johns56194565,

If you're looking for a way to add/change the Type drop-down, have a look at my tutorial on the subject: https://levelup.gitconnected.com/aem-populate-a-drop-down-with-a-data-source-edafada90cc4

johns56194565
Level 2
August 30, 2020
Hi @theo_pendle thanks for responding. No this is not what I am looking for. I am trying to use form option component on my page which has option to choose source as static list which exist in JCR. I want to understand how the list is created that I can use as source. Please refer to the doc I shared : https://docs.adobe.com/content/help/en/experience-manager-core-components/using/components/forms/form-options.html it has an option to keep list in source.
arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
August 31, 2020
johns56194565
Level 2
September 1, 2020
Hi @arunpatidar thanks for replying and pointing to code but still it does not pick the list. Can you maybe share a snapshot of static list that is getting picked?
johns56194565
Level 2
September 1, 2020

delete

johns56194565
Level 2
September 1, 2020

Hi @arunpatidar thanks for replying and pointing to code but still it does not pick the list. Can you share a snapshot maybe of static list that is getting picked?