WPAlchemy: Modify cloned item of repeating field group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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(e, 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