Hello, i have a problem with my modal and repeater field
<?php while(the_repeater_field('serviceshomepage')): ?>
<div class="medium-3 columns">
<a href="#" data-reveal-id="myModal1">
<img src="<?php the_sub_field('imgcontent'); ?>"/>
<h5 class="title-presta"><?php the_sub_field(’title'); ?></h5>
</a>
</div>
<div id="myModal1" class="reveal-modal" data-reveal>
<div class="medium-12 columns">
<img src="<?php the_sub_field(‘imgcontent'); ?>"/>
</div>
<a class="close-reveal-modal">×</a>
</div>
<?php endwhile; ?>
My problem is : when i click on the image 1, 2, 3…. there is the modal 1 which open. Ofcourse because the data-reveal-id is myModal1.
Do you know with what can i change it for use the repeater field.
I won’t use simple field because i have lot’s of modal … =(
Please help me!!!! =(
Sorry for my english, i’m french.
Bye.
Pierre
<?php if( have_rows('bloc-modal')) : ?>
<?php $i = 0; while(the_repeater_field(‘bloc-modal')): ?>
<div class="medium-3 columns »>
<a href="#">">
<img /> »/>
<h5 class="title-presta"><?php the_sub_field('menu_titre'); ?></h5>
</a>
<div id="myModal<?php echo $i ?>" class="reveal-modal" data-reveal>
<div class="medium-12 columns »>
<img /> »/>
</div>
<a>×</a>
</div>
</div>
<?php $i++ ; endwhile; ?>
<?php endif; ?>