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

SOLVED

How to create a static list for Form option component

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
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...

 

 

View solution in original post

10 Replies
ChitraMadan
Community Advisor
Community Advisor

Hi @johns56194565 ,

 

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

johns56194565
Level 2
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.
Theo_Pendle
Community Advisor
Community Advisor

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
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.
Arun_Patidar
Correct answer by
Community Advisor
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...

 

 

View solution in original post

johns56194565
Level 2
Level 2
Hi @Arun_Patidar 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?
Arun_Patidar
Community Advisor
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

 

 

johns56194565
Level 2
Level 2

Hi @Arun_Patidar 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?