<div class="col-sm-6">
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
<?php echo $form->field($model, 'category_id')->dropDownList(\yii\helpers\ArrayHelper::map(
$categories,
'id',
'name'
), ['prompt' => '']) ?>
<?= $form->field($model, 'amount')->textInput() ?>
<?= $form->field($model, 'delivery_charge')->textInput() ?>
<?php echo $form->field($model, 'description')->widget(
\yii\imperavi\Widget::class,
[
'plugins' => ['fullscreen', 'fontcolor', 'video'],
'options' => [
'minHeight' => 200,
'maxHeight' => 200,
'buttonSource' => true,
'convertDivs' => false,
'removeEmptyTags' => true,
'imageUpload' => Yii::$app->urlManager->createUrl(['/file/storage/upload-imperavi']),
],
]
) ?>
</div>
<div class="col-md-6">
<?php echo $form->field($model, 'attachments')->widget(
Upload::class,
[
'url' => ['/file/storage/upload'],
'maxFileSize' => 5000000, // 5 MiB,
'acceptFileTypes' => new JsExpression('/(\.|\/)(gif|jpe?g|png)$/i'),
]
);
?>
<?= $form->field($model, 'availability')->widget(SwitchInput::className()); ?>
<?= $form->field($model, 'status')->dropDownList(\common\models\Product::statuses()) ?>
<?php echo $form->field($model, 'features')->widget(
\yii\imperavi\Widget::class,
[
'plugins' => ['fullscreen', 'fontcolor', 'video'],
'options' => [
'minHeight' => 200,
'maxHeight' => 200,
'buttonSource' => true,
'convertDivs' => false,
'removeEmptyTags' => true,
'imageUpload' => Yii::$app->urlManager->createUrl(['/file/storage/upload-imperavi']),
],
]
) ?>
</div>
iam using the widget (trntv\filekit\widget \ Upload) of yii2-starter-kit, implement the use of the dynamic form (wbraganca\dynamicform\DynamicFormWidget), the problem is that the upload widget works only on the first element, when adding Other items fail to load correctly
_form
'dynamic-form']); ?>only first one is working the second one not working the value get null in controller.also second one css and js also not working.