Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Default entries in multifield with different default values

Avatar

Level 2

Hi,

 

I have a requirement where i need to show 3 default entries in the multifield with 3 different values.

 

I have used the field.addItem(); field.doLayout(); to get the default entries using listeners. However, iam not getting how to add content to these 3 default entries.

Can someone please help me.

 

Thanks,

Maheswari

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @maheswariv26797 

You need to write a custom listener and based on multifield item count set the different values to the specific field with in multifield.

AG

View solution in original post

4 Replies

Avatar

Community Advisor

I think, you should you cq:template to create item0, item1 and item3 nodes with default values so that as soon as multifield component added three fields created automatically with three different values.



Arun Patidar

Avatar

Level 2

Thanks for your response. However, I want this to be done in classic UI. Can you please tell how to achieve in classic ui

Avatar

Community Advisor
I am not sure but you can do it via setting the default value in multi filed format as saved in node


Arun Patidar

Avatar

Correct answer by
Community Advisor

Hi @maheswariv26797 

You need to write a custom listener and based on multifield item count set the different values to the specific field with in multifield.

AG