How to use a List of nodes as the Source in the Core Form Options component?

nydel09 08-03-2019

The Core Form Options component has a dialog field called Source which allows you to select a list of nodes from the path browser to make up the options in a dropdown list.

I have a node of jcr:primaryType = nt:unstructured with multiple child nodes of the same type that have String properties for text and value. When I try to select the parent node from the dialog, it does not show up in the path finder. I am able to manually enter the path to the parent node in the dialog field, and the dropdown list correctly populates, but only in authoring mode. When published, the dropdown field does not show on my page, presumably because it cannot resolve the path to the node.

Are there certain properties I'm missing on the node(s)? What do I need to do to get this to work correctly? I am on 6.4.2.

Accepted Solutions (1)

Accepted Solutions (1)

nydel09 12-03-2019

The dropdown is now correctly populating in my published instance. I believe the issue was related to the webserver cache. I'm still not sure why the pathfinder does not allow me to select the node itself, but filling out the path manually and uploading the node to the published server via a content package to activate seems to work.

Answers (7)

Answers (7)

smacdonald2008 11-03-2019

Can you please show a screen shot of the component and its nodes you are using. There may be another way to do what you are trying to accomplish.

In case you missed something - here is the technical docs - aem-core-wcm-components/content/src/content/jcr_root/apps/core/wcm/components/form/options/v2/option...

nydel09 11-03-2019

These are the steps I am taking:

1. Author the page with the form component from the authoring server

2. Manually type in /content/countries into the 'List' field because the pathfinder cannot find that node in the JCR

3. View the page in authoring mode and see that the dropdown list correctly populates with the data from the child nodes under /content/countries

4. Publish the page

5. View the page in the published environment and see that the dropdown field does not show at all (I think the dropdown hides itself if it thinks there aren't any options provided)

6. Try to activate/publish the /content/countries node using the Tree Activator, however the Tree Activator cannot find the node either

7. Package the /content/countries node from authoring and upload/install the node to the published server (4503) to activate it that way

8. See that the dropdown still does not show on the published page

smacdonald2008 11-03-2019

You stated -- "I still haven't been able to get the dropdown list to populate in a published environment."

Are you trying to set a component dialog on PUBLISH?

nydel09 11-03-2019

Bump. I still haven't been able to get the dropdown list to populate in a published environment. Here is what my dialog fields look like:

Screen Shot 2019-03-11 at 13.37.04.png

/content/countries is a node in my JCR with child nodes that look like this:

Screen Shot 2019-03-11 at 13.38.49.png

Is there something I'm missing?

nydel09 08-03-2019

In the Form Options component dialog, I am using the dialog field called Source and I have it set to 'List'. After selecting List, a new path field shows up which should allow me to select a path in my JCR where I've created nodes to represent dropdown items, but the nodes do not show up so I have to manually enter the path. Entering the path manually successfully populates the dropdown list in authoring mode, but not in published mode. I am not sure if the issues related to the nodes not showing in the path finder and the dropdown not showing in published mode are related. For now I would just like to get the dropdown items to show up in published.