I am trying to build a custom AEM 6.1 form template with the standard fields our company uses. To that end I want to pre-fill the country, state, and province drop down on the template or even the page component.
I saw the article on creating a pre-filled drop down (https://docs.adobe.com/docs/en/aem/6-1/develop/components/developing-forms.html#Preloading%20Form%20...) but what I cannot figure out is how to call or assign the property of the Items Load Path field in CRXDE lite on the template?
Someone has to have encountered this and solved it before? Suggestions?
Solved! Go to Solution.
Views
Replies
Total Likes
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".
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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".
Views
Replies
Total Likes
Yes, I think that will do it. Going to try the fragment approach first. Hoping it will be intuitive enough for our authors.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes