Code from _formCreate.php
<div class="col-lg-6 height3">
<p class="col-lg-8">ورزشی</p>
<?= $form->field($model, 'project_control_id[]')->input('checkbox', [ 'value' => '1', 'class' => 'col-lg-4'])->label('') ?>
</div>
<div class="col-lg-6 height3">
<p class="col-lg-8">سرگرمی</p>
<?= $form->field($model, 'project_control_id[]')->input('checkbox', [ 'value' => '2', 'class' => 'col-lg-4'])->label('') ?>
</div>
Model variable:
public $project_control_id;
Defined rules(){ [['project_control_id'], 'string', 'max' => 5000],
My $model
is not saved when I call:
<?= $form->field($model, 'project_control_id[]')->input
but is saved properly in this case:
<?= $form->field($model, 'project_control_id')->input
The question is why my model is not saved in the first case?