- Under /etc/designs/yoursite create a folder (jcr:primaryType is sling:Folder)
- Enter the name of the property that you'd like to use as your value(s). Type should be String with either a single or multiple value.
- For dropdown lists, add your items one at a time in the format of value=description, ie: US=United States.
Be sure that you're in the /etc folder so your form will be able to get to the values on a publish instance.
In your form object, change the Items Load Path to the full path of your variable: /etc/designs/yoursite/formlistvalues/provState, for example. In this case, "formlistvalues" is the folder name and "provState" is the name of the property holding the values.
Thank you! However, I do not want the author to have to learn or remember the Items Load Path.
Instead, in the form's template I want to include a dropdown item of sling:resourceType = /libs/fd/af/components/guidedropdownlist that has the contents of the countrylist I created already in it.
You have a couple of choices then (IMO). You could create a custom component that could be dragged & dropped from your Adaptive From component list. Or a much simpler approach, create all of your standard items in your form, then when complete, turn each of the elements, or groups of common elements into Form Fragments. All those fragments could be used across all your form sets. In particular, very useful for headers, and common sections of forms that you need to be consistent.
To create the fragment, simply select the panel, then select "Save as Fragment".
Fragments are very simple, are indexed for search, and show up right in the components list so it should be really easy for your authors to find and use. Note that you can also integrate code into the elements of a fragment so if you find yourself repeating tasks, they are a great tool to avoid repeating of both visual and logical elements.