Support

Account

Home Forums General Issues How to select multiple options from specific repeater row? Reply To: How to select multiple options from specific repeater row?

  • For anyone interested, or has had the same issue, I solved this myself. Value to become values and the singular value to loop through each array item:

    <?php
    		$field = get_field_object('choices');
                    $values = $field['value'];
    
                    foreach ($values as value) :
    
    		$rows = get_field('gallery_repeater', 'option');
    		$specific_row = $rows[$value]; 
    
    		$sub_field_value = $specific_row['gallery'];
    		?>
    
    	<?php foreach ($sub_field_value as $img) : ?>
    	   <div data-src="<?php echo esc_url($img['sizes']['large']); ?>" title="<?php echo esc_attr($img['title']); ?>">
    		<img />" alt="<?php echo esc_attr($img['alt']); ?>" title="<?php echo esc_attr($img['title']); ?>" />
    		</div>
            <?php endforeach ?> // $img
    	</div>
    <?php endforeach ?> // $value