Home Forums Add-ons Flexible Content Field Get flexible field inside flexible field


Get flexible field inside flexible field

  • Hi all,

    I have flexible content field. What i want to achieve is to get all fields from EACH module1 inside module2.
    How can i do this?

    Here is the demo code:

    if( have_rows('modules') ): while ( have_rows('modules') ) : the_row();
    if( get_row_layout() == 'module1' ): echo the_sub_field('text1');
    elseif( get_row_layout() == 'module2' ): echo the_sub_field('text2'); echo 'ALL FIELDS FROM MODULE1';
    elseif( get_row_layout() == 'module3' ): echo the_sub_field('text3');
    endif; endwhile; endif; ?>


  • Have you looked at Working with Nested Repeaters?
    This is a tutorial that covers working with nested repeaters and flexible content fields.

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

The topic ‘Get flexible field inside flexible field’ is closed to new replies.