我能够创造一个新记录。我使用两种模型来创建记录。数据保存到两个表中。
<?= $form->field($model, 't_name')->textInput(['maxlength' => true]) ?>
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><h4><i class="glyphicon glyphicon-flash"></i> Tariff Slabs</h4></div>
<div class="panel-body">
<?php DynamicFormWidget::begin([
'widgetContainer' => 'dynamicform_wrapper', // required: only alphanumeric characters plus "_" [A-Za-z0-9_]
'widgetBody' => '.container-items', // required: css class selector
'widgetItem' => '.item', // required: css class
'limit' => 10, // the maximum times, an element can be cloned (default 999)
'min' => 1, // 0 or 1 (default 1)
'insertButton' => '.js-add-filter', // css class
'deleteButton' => '.js-remove-filter', // css class
'model' => $modelsTariffSlabs[0],
'formId' => 'dynamic-form',
'formFields' => [
'slab_name',
'slab_start',
'slab_end',
'rate'
],
]); ?>
现在,当我尝试更新它时,我不是第二个模型的数据。
POPMUISE
慕运维8079593