i have a write panel in magic fields with a group that can be duplicated, within this is an image field that can be duplicated.
So far i have the code for the duplicate group but i'm a little stuck on how to display the duplicate field within this.
I'm using Magic Fields 1.6.2.1
My code for the duplicate group is
<?php
$gallerys = getGroupOrder('gallery_section_title');
foreach($gallerys as $gallery) {
?>
<?php echo get('gallery_section_title',$gallery);?>
<?php echo get('gallery_section_text',$gallery);?>
<?php echo get('gallery_section_image',$gallery);?>
<?php } ?>
This part is the part that needs to be duplicated with in the duplicate group
<?php echo get('gallery_section_image',$gallery);?>
I did a few searches but can't find anything that works. Does anyone have any ideas how to implement this, i'm stumped.
Thank you
I've worked this out and the code below works for me, there a probably a better more efficient way of doing it, but this works.
<?php $groups = getGroupOrder('gallery_section_title');
foreach($groups as $group) { ?>
<?php echo get('gallery_section_title', $group); ?>
<?php echo get('gallery_section_text', $group); ?>
<?php $fields = get_field_duplicate('gallery_section_image',$group);
foreach($fields as $field)
{ ?>
<?php echo $field[o]; ?>
<?php } ?>
<?php } ?>