diff --git a/ActiveField.php b/ActiveField.php
index 75890b2..35e1db8 100644
--- a/ActiveField.php
+++ b/ActiveField.php
@@ -248,10 +248,13 @@ class ActiveField extends \yii\widgets\ActiveField
}
if (!isset($options['itemOptions'])) {
$options['itemOptions'] = [
- 'container' => false,
'labelOptions' => ['class' => 'checkbox-inline'],
];
}
+ } elseif (!isset($options['item'])) {
+ $options['item'] = function ($index, $label, $name, $checked, $value) {
+ return '
' . Html::checkbox($name, $checked, ['label' => $label, 'value' => $value]) . '
';
+ };
}
parent::checkboxList($items, $options);
return $this;
@@ -271,10 +274,13 @@ class ActiveField extends \yii\widgets\ActiveField
}
if (!isset($options['itemOptions'])) {
$options['itemOptions'] = [
- 'container' => false,
'labelOptions' => ['class' => 'radio-inline'],
];
}
+ } elseif (!isset($options['item'])) {
+ $options['item'] = function ($index, $label, $name, $checked, $value) {
+ return '' . Html::radio($name, $checked, ['label' => $label, 'value' => $value]) . '
';
+ };
}
parent::radioList($items, $options);
return $this;