I am new for yii2 .plz help me to solve this problem.
when i select the multiple checkbox values it show the field must be a string
thanks in advance
I am new for yii2 .plz help me to solve this problem.
when i select the multiple checkbox values it show the field must be a string
thanks in advance
post some code please
it is my _form.php
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\Field */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="field-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'gender')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'state')->textInput(['maxlength' => true]) ?>
<?=$form->field($model, ‘skills’)->checkboxList([‘a’ => ‘Item A’, ‘b’ => ‘Item B’, ‘c’ => ‘Item C’])?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>