Hi,
In Touch-Ui I can create a dropdown selection populated from an ajax call that returns JSON.
I need to be able to select 1 .. n values in the selection.
I have 2 problems
1) Add multiselect to dropdown
2) Have a list multiple values selected by the author be available for processing in JSP.
Regards
Clive Stewart
Solved! Go to Solution.
Hi
As mentioned by Andrew's, for multi-select:-
// multipleboolean: Indicates if the user is able to select multiple selections.
Example:
+ myselect
- sling:resourceType = "granite/ui/components/foundation/form/select"
- emptyText = "Select"
- name = "myselect"
+ items
+ option1
- text = "op1"
+ option2
- text = "op2"
And For populating the Dropdown via Ajex,
Please refer to this community article:- https://helpx.adobe.com/aem-forms/6/dynamically-populate-dropdowns.html
I hope this solves your problem.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Hi
For populating the Dropdown via Ajex,
Please refer to this community article:- https://helpx.adobe.com/aem-forms/6/dynamically-populate-dropdowns.html
For Multi-Select i also need to figure it out.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Hi Clive,
You can add multi-select to the select component by adding multiple="{Boolean}true". Your component would look something like this:
<selectExample jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/select" fieldLabel="Multi Select Example" multiple="{Boolean}true" name="./selectExample"> <items jcr:primaryType="nt:unstructured"> <foo jcr:primaryType="nt:unstructured" text="Foo" value="foo"/> <bar jcr:primaryType="nt:unstructured" text="Bar" value="bar"/> </items> </selectExample>
The selected values will display as tags below the select input. I've noticed that there are some bugs with this when you place the multi-select inside a multifield component.
Hi
As mentioned by Andrew's, for multi-select:-
// multipleboolean: Indicates if the user is able to select multiple selections.
Example:
+ myselect
- sling:resourceType = "granite/ui/components/foundation/form/select"
- emptyText = "Select"
- name = "myselect"
+ items
+ option1
- text = "op1"
+ option2
- text = "op2"
And For populating the Dropdown via Ajex,
Please refer to this community article:- https://helpx.adobe.com/aem-forms/6/dynamically-populate-dropdowns.html
I hope this solves your problem.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Thank you Kautuk,
I have gone through the example you gave and have been able to resolve the issue as a result.
regards
Clive
Views
Replies
Total Likes