ACF – add a group inside a repeater [closed]

You code looks very confusing. Why are you using the ‘foreach’?

If you follow the ACF documentation, you just need to use:

<?php
if( have_rows('questions') ):
while( have_rows('questions') ): the_row();
// vars
$repeater-item = get_sub_field('repeater-item');
?>
<div class="content">
<?php the_sub_field('caption'); ?>
</div>

For the group.
Source: https://www.advancedcustomfields.com/resources/group/

And you only have to use:

if( have_rows('item') ):
while ( have_rows('item') ) : the_row();
    the_sub_field('item-whatever');
endwhile;
else :
// no rows found
endif;

For the item.
Source: https://www.advancedcustomfields.com/resources/repeater/

If you are using a variable called ‘questions’, where is that variable created and what info is it receiving?

Are you using ‘sub_field’ or just ‘field’ in the code?

At least with the info you gave, your code looks completely wrong to me.