Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
WPAlchemy: Modify cloned item of repeating field group
<a style="float:right; margin:0 10px;" href="#" class="dodelete-dates button">Remove All Dates</a>
<p>Add dates on which this course will run.</p>
<?php while($mb->have_fields_and_multi('dates')): ?>
<?php $mb->the_group_open(); ?>
<?php $mb->the_field('date'); ?>
<p><input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>" class="datepicker" />
<a href="#" class="dodelete button">Remove Date</a></p>
<?php $mb->the_group_close(); ?>
<?php endwhile; ?>
<p style="margin-bottom:15px; padding-top:5px;"><a href="#" class="docopy-dates button">Add Date</a></p>
<script type="text/javascript">
//<![CDATA[
jQuery(function($) {
$.wpalchemy.bind('wpa_copy', function(the_clone) {
$('.datepicker', the_clone).css('display','none');
//console.log(the_clone);
});
});
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.