public $categories_ids = [];
public function rules()
{
return [
['categories_ids', 'each', 'rule' => ['integer'], 'skipOnEmpty' => true ],
['categories_ids', 'filter', 'filter' => 'array_filter', 'skipOnEmpty' => true],
];
}
<?= $form->field($searchModel, 'categories_ids')
->dropDownList(Categories::getCategoriesNamesArray(), [
'class' => 'category-select form-control',
'multiple' => true
])
->label('Категории')
?>
<div class="form-group field-videosearch-categories_ids">
<label class="control-label" for="videosearch-categories_ids">Категории</label>
<input type="hidden" name="VideoSearch[categories_ids]" value=""><select id="videosearch-categories_ids" class="category-select form-control select2-hidden-accessible" name="VideoSearch[categories_ids][]" multiple="" size="4" tabindex="-1" aria-hidden="true">
<option value="707">HD</option>
<option value="614">3Д</option>
// ...
</select>
<span class="select2 select2-container select2-container--default select2-container--focus" dir="ltr" style="width: 1021px;"><!--тут конейнер селект2 --></span>
<div class="help-block"></div>
</div>
<div class="number-control">
<?= $form->field($model, 'child_age[]', [
'template' => '{input}{error}'.Html::button('', ['class' => 'minus']).Html::button('', ['class' => 'plus'])
])->input('text', ['value' => 6])->label(false) ?>
</div>
$form->field($model, 'child_age[]', [
заменить на $form->field($model, 'child_age', [
if ($res === 'Отправлено') { // Именно это указано в возможных ответах
// ...
}