Open xuanzi23 opened 7 years ago
I had same the problem with nested tables. Solution was to rename every nested table with parent index index.
<?php
DynamicFormWidget::begin([
'widgetContainer' => 'dynamicform_inner',
'widgetBody' => '.container-qvariants-'.$index,
'widgetItem' => '.qvariant-item-'.$index,
'limit' => 4,
'min' => 2,
'insertButton' => '.add-qvariant-'.$index,
'deleteButton' => '.remove-qvariant-'.$index,
'model' => $subModels[0],
'formId' => 'dynamic-form',
'formFields' => [
'option',
'points',
],
]);
?>
I have the same issue. I don't have nested tables. @xuanzi23, can you resolve it?
@koquipizzi, I found a solution here, but now I can`t find the link (author, sorry):
// $toclone = $(widgetOptions.template); $toclone = _parseTemplate(widgetOptions);
in yii2-dynamic-form.js (_addItem method).
Hi, recently i using this plug in my project. I found out will duplicate form like example when i press '+' once will add many form at below.
Second problem is, when i save, after that i add new form will clone the first row data at below. I need clear it myself quite weird. anything will cause this thing happen?