Hi,
i solve using acf/prepare_field
I filter the repeater field always and dynamically i change the “max” attribute.
Example
function acf_limit_checkin_guest( $field ) {
global $wpdb;
$book_id = $_GET['wpseo_cf7_req_book_id'];
$guest = get_post_meta($book_id,"booking_guests",true);
$field['max'] = $guest-1;
return $field;
}
add_filter('acf/prepare_field/key=field_60b76a6aba425', 'acf_limit_checkin_guest');