<?php
if( have_rows('repeater_field_name') ): ?>
<?php while( have_rows('repeater_field_name') ): the_row();
// Get the value of the checkbox field for the current row
$checkbox_value = get_sub_field('checkbox_field_name');
// Check if the checkbox is checked (true)
if( $checkbox_value ) {
// Display content when the checkbox is checked
?>
<div class="repeater-row">
<p>Checkbox is checked for this row.</p>
<?php
// Display other sub-fields within the repeater row if needed
// Example:
// the_sub_field('text_field_name');
?>
</div>
<?php
} else {
// Optional: Display something else when the checkbox is not checked
// echo '<p>Checkbox is not checked for this row.</p>';
}
?>
<?php endwhile; ?>
<?php endif; ?>