Support

Account

Home Forums ACF PRO Is it possible to have 2 flexible field groups, but they work like one Reply To: Is it possible to have 2 flexible field groups, but they work like one

  • Tried to get this working again and i seem to get it. It’s an array inside and array so i used this code to pull out the data (i used the ZIP file i have above).

     
    <?php if( have_rows('modules_all') ): 
      while( have_rows('modules_all') ): the_row();
    
              $checkbox = get_sub_field('is_custom_modules');
              if($checkbox) { // is yes use custom modules ?>
    
                   <?php
    
                    //print_r(get_sub_field('modules_custom_reusable'));
                    $contentArray = get_sub_field('modules_custom_reusable');
                    
                    $contentTitle = $contentArray['modules_custom'][0];
                    $contentTitle = print_r($contentTitle['content_title']); 
    
                    ?>
    
                    <?php $contentTitle; ?>
    

    You can uncomment the first line to see how the array looks like or use var_dump instead print_r.

    It may not be the perfect solution as i’m not a real PHPer but it seems to be working/taking me further.