Expand my Community achievements bar.

Multifield 'Select' fields are binded to each other, if one is changed, all gets changed.

Avatar

Level 4

Hi,

I have been trying to implement the multifield, using the links below. 

61 package install - https://drive.google.com/file/d/0B4d6KmbLkAumRk5OeUlQY3N1c3c/view?usp=sharing

61 demo - https://drive.google.com/file/d/0B4d6KmbLkAumLV9LUW5HeDFMVU0/view?usp=sharing

Use-Case

1. The multifield has a 'Select', that needs to be populated using JS, instead of datasource (because In the dialog box, there is a drop down. Based on it’s value, the ajax request fetch the data and update the Select options and there is no way to inject the dialog’s input to the datasource jsp).

2. I am dynamically populating the Select using the following link:

http://experience-aem.blogspot.in/2015/04/aem-6-sp2-touchui-adding-dynamic-select-options.html

3. When I do so, the different instances of 'Select' inside multifield has the same values, if I change one Select, all others also get changed. (refer attachment)

5 Replies

Avatar

Level 10

Each Select instance not have its own data?  You are coding the select instance in a JS file correct? 

Avatar

Level 10

I was talking to some Touch UI experts and they said: 

 

Its being used in a mutlifield so I guess each multifield item with select needs to be “controlled individually” using a dynamic id or something like that – needs coding. 

I will look for examples - we need to capture this in a helpx article. , 

Avatar

Level 4

Hi,

It would be great if you can provide some good example with multifield with Select option, that get's dynamically populated using JS.

Avatar

Level 10

Unfortunately - the above article is the only one i can find for this use case. Did you try extending the example as our touch UI expert recommended, Giving each select a dynamic id ?