I don't get the full idea, but I think you want to add the separator for every 2 items / list? What I am thinking is to create a custom item rendered using the $index
.
<?= Html::checkboxList('field_name', '', [
'organisation_name' => 'Organisation Name',
'organisation_vat_number' => 'Organisation VAT Number',
'invoice_number' => 'Invoice Number',
'invoice_date' => 'Invoice Date'
], [
'item' => function ($index, $label, $name, $checked, $value) {
$separator = ($index % 2 == 1) ? '<hr>' : '';
return "<label class='form-control'>" . Html::checkbox($name, $checked, ['value' => $value]) . " $label</label>" . $separator;
}
]) ?>
The result :