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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

How to make use of "Items load path" for dropdown list in AEM 6 form

Avatar

Level 2

While creating a dropdown list in my form I noticed a field called "Items Load Path". Can this field be used to provide a url from which it loads the options available in a dropdown list? 

Where would the URL reside, and how can I put values in that URL? Can someone please show an example? 

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi

I've had the same problem recently. I could solve like this:

1) in CRX create a node with property 'jcr:primaryType' = 'sling:Folder' (let's call it 'xy-lookup-list')

2) add a multi string property containing the key-value-pairs to the newly created node. The property name (let's call it 'xy-lookup-values') will be part of the loading path. A key-value pair looks like this 'keyXY=valueXY'.

3) specify the crx path as loading path in the dialog of the widget that shall use the lookup value. The loadpath is a 'crx' path like '/content/dam/.../xy-lookup-list/xy-lookup-values'. Make sure the last two elements of the path are the names of the node and the attribute.

Following explanation helped me: http://stackoverflow.com/questions/29847445/how-to-use-items-load-path-in-dropdown-list-of-aem-form

Hope this helps

View solution in original post

2 Replies

Avatar

Not applicable

I'm trying to do the same.. but not able to get a solutionusing the default "DropdownList" under "Forms"

If we use the component used in Adaptive Forms (GuideDropDownList - /libs/fd/af/components/guidedropdownlist ) this example works: https://helpx.adobe.com/aem-forms/6/dynamically-populate-dropdowns.html

Avatar

Correct answer by
Level 3

Hi

I've had the same problem recently. I could solve like this:

1) in CRX create a node with property 'jcr:primaryType' = 'sling:Folder' (let's call it 'xy-lookup-list')

2) add a multi string property containing the key-value-pairs to the newly created node. The property name (let's call it 'xy-lookup-values') will be part of the loading path. A key-value pair looks like this 'keyXY=valueXY'.

3) specify the crx path as loading path in the dialog of the widget that shall use the lookup value. The loadpath is a 'crx' path like '/content/dam/.../xy-lookup-list/xy-lookup-values'. Make sure the last two elements of the path are the names of the node and the attribute.

Following explanation helped me: http://stackoverflow.com/questions/29847445/how-to-use-items-load-path-in-dropdown-list-of-aem-form

Hope this helps