Support

Account

Home Forums Add-ons Flexible Content Field Flexible Field within Flexible Field ? Reply To: Flexible Field within Flexible Field ?

  • Thanks Elliot! Works like charm! ๐Ÿ™‚

    EDIT

    BTW. I managed to create flexible field inside flexible in dashboard. Now when I’m trying to return value of this fields in front end.But its not returning value of sub flexible fields.

    I’m using following is code.

    <?php
    while (has_sub_field("main_field")):
    ?>;
            <?php
      if (get_row_layout() == "layout_1"):
    ?>
               <div>
                    <php the_sub_field("textarea"); ?>
                </div>
            <?php
      endif;
    ?>
           <?php
      if (get_row_layout() == "layout_2"):
    ?>
           <?php
        if (get_sub_field("main_2")):
    ?>
               <?php
          if (get_row_layout() == "layout_2a"):
    ?>
                   <div>
                    <?php
            the_sub_field("text_field");
    ?>
                   </div>    
                <?php
          elseif (get_row_layout() == "layout_2b"):
    ?>
                   <img src="<?php
            the_sub_field('image_field');
    ?>" class="alignnone size-full" />
                    <?php
          endif;
        endif;
      endif;
    ?>
       <?php
    endwhile;
    ?>