Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

How to create a static list for Form option component

Avatar

Level 2

Need inputs on how to create a static list for AEM form option component source as per https://docs.adobe.com/content/help/en/experience-manager-core-components/using/components/forms/for...

@ChitraMadan @BrianKasingli @arunpatidar 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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/bundl...

 

 



Arun Patidar

View solution in original post

11 Replies

Avatar

Community Advisor

Hi @johns56194565 ,

 

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

Avatar

Level 2
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/for... it has an option to keep list in source.

Avatar

Level 10

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

Avatar

Level 2
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/for... it has an option to keep list in source.

Avatar

Correct answer by
Community Advisor

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/bundl...

 

 



Arun Patidar

Avatar

Level 2
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?

Avatar

Community Advisor

You need to do it like below :

1. Create a static list nodes , the option node should have text and value properties

e.g. /var/forms/dropdowns

 

Arun_Patidar_0-1598992360072.png

 

Then use this in the node structure as list

 

Arun_Patidar_1-1598992389274.png 

Arun_Patidar_0-1598992523648.png

 

 



Arun Patidar

Avatar

Level 2

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?