Nested multifield loop

Avatar

Avatar
Applaud 25
Level 2
Shaheena_Sheikh
Level 2

Likes

2 likes

Total Posts

97 posts

Correct reply

1 solution
Top badges earned
Applaud 25
Applaud 5
Affirm 1
Validate 10
Validate 1
View profile

Avatar
Applaud 25
Level 2
Shaheena_Sheikh
Level 2

Likes

2 likes

Total Posts

97 posts

Correct reply

1 solution
Top badges earned
Applaud 25
Applaud 5
Affirm 1
Validate 10
Validate 1
View profile
Shaheena_Sheikh
Level 2

27-04-2021

I have a nested multified and I need to loop through the inner multifield items also. For outer multifield I was using :

$(".coral3-Multifield-item").each(function( index ) {//body}

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

275 likes

Total Posts

320 posts

Correct reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

275 likes

Total Posts

320 posts

Correct reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Anudeep_Garnepudi
MVP

27-04-2021

@Shaheena_Sheikh 

Target the parent/root multifiled using multifiled name like below.

$("[data-granite-coral-multifield-name='./multifield-name'] .coral3-Multifield-item").each(function( index ) {
        //Parent multifield items loop
	$(this).find(".coral3-Multifield-item").each(function( index ) {
            //Child multifiled items loop
	)};
)};

Answers (1)

Answers (1)

Avatar

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
Nikhil-Kumar
MVP

28-04-2021

@Shaheena_Sheikh -  You need to target the specific class and use coral Ui in jquery. One example that you can consider is : https://aemsimplifiedbynikhil.wordpress.com/2018/07/29/multifield-and-dialog-data-in-jquery/