Answer the question
In order to leave comments, you need to log in
How to fix an error in a widget?
I installed the yii2-multiple-input widget, but when adding blocks, I get the error Setting unknown property: unclead\multipleinput\MultipleInputColumn::default, that is, I also connected this class additionally, but I still didn’t understand what the problem
was Here is the code
<?php $form = ActiveForm::begin([
'enableAjaxValidation' => true,
'enableClientValidation' => false,
'validateOnChange' => false,
'validateOnSubmit' => true,
'validateOnBlur' => false,
]); ?>
<div id="customForm">
<?= $form->field($custom, 'custom')->widget(MultipleInput::className(), [
'max' => 6,
'columns' => [
[
'name' => 'tovar',
'type' => 'textInput',
'title' => 'Товар',
'default' => 1,
],
[
'name' => 'number',
'type' => 'textInput',
'title' => 'Кол-во',
'options' => ['min' => 0]
]
],
]) ?>
Answer the question
In order to leave comments, you need to log in
'default' => 1,
take away. The error clearly says that there is no such property
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question