Skip to content

Commit 59e32c6

Browse files
authored
Fix Issue wbraganca#333
Fix javascript error: Cannot read properties of undefined (reading 'settings')
1 parent bebb469 commit 59e32c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DynamicFormWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function registerAssets($view)
216216
$js .= "});\n";
217217
$view->registerJs($js, $view::POS_READY);
218218

219-
$js = 'jQuery("#' . $this->formId . '").yiiDynamicForm(' . $this->_hashVar .');' . "\n";
219+
$js = 'jQuery("#' . $this->formId . '").on(\'afterInit\', function () {jQuery("#' . $this->formId . '").yiiDynamicForm(' . $this->_hashVar .');});' . "\n";
220220
$view->registerJs($js, $view::POS_LOAD);
221221
}
222222

0 commit comments

Comments
 (0)