Home Forums Add-ons Repeater Field Nested Repeater, inside a flex content, inside a repeater.


Nested Repeater, inside a flex content, inside a repeater.

  • Hey Elliott,

    I’m having an issue that I’ve thrown a few hours into with no luck.

    I’ve got a repeater inside a flexible content which is, in turn, inside a repeater, all in an options tab.

    All is happy until I get to deepest level where the get_sub_field value is refusing the play along.

    I know the if/while in the flex content is working because it will create a block for each element I’ve added, but the actual fields inside the repeater don’t seem to want to register. Have I hit a physical limit here, or is there something silly I’m doing?

    	while(have_rows('partner_portal_tab','options')): the_row();
            <div id="tab-<?php echo $i; ?>">
            	 	while(have_rows("tab_content")): the_row(); ?>
    					<?php if(get_row_layout() == "text_content_block"): // layout: Text Content ?>
    						<div class="userContent PPtextContentBlock">
    							<?php the_sub_field('text_content'); ?>
    					<?php elseif(get_row_layout() == "file_list_block"): // layout: File List Content ?>
    			            	while(have_rows('file_list')): the_row();
    							<article class="faqList cf">
                                    <dl class="faqQuestion">
    							        	<p class="questionInner">
    							        		<?php the_sub_field('file_list_title'); ?>
    							        	<span class="faqQuestonArrow"></span>
    							        	<?php the_sub_field('file_list_content'); ?>
    					<?php endif; ?>
    				<?php endwhile; ?>
    			<?php endif; ?>
    		<!--#tab-<?php echo $i; ?>--></div>
  • Hi @letterafterz

    Your code above should work, so perhaps you have hit a limit and the values simply arn’t being loaded.

    Can you please debug the original repeater field like so:

    echo '<pre>';
    	print_r( get_field('partner_portal_tab','options') );
    echo '</pre>';

    Have a look at the data displayed. Is all the data correct?


  • Thanks Elliot,

    I did some run through in the support section and we came to the conclusion that the ‘file_list’ array was showing the ‘file_list_title’ as being empty.

    We came to the conclusion that this is in some way a limitation of memory or something. I tried increasing PHP settings to no avail, but just ended up rebuilding this to have two levels less repeaters and that seemed okay. Not sure exactly what limit was playing against me which is a bit frustrating.

    Thanks for your help!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Nested Repeater, inside a flex content, inside a repeater.’ is closed to new replies.