Skip to content

Commit

Permalink
Fix Issue wbraganca#333
Browse files Browse the repository at this point in the history
Fix javascript error: Cannot read properties of undefined (reading 'settings')
  • Loading branch information
soareseneves authored Aug 8, 2023
1 parent bebb469 commit 59e32c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DynamicFormWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function registerAssets($view)
$js .= "});\n";
$view->registerJs($js, $view::POS_READY);

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

Expand Down

0 comments on commit 59e32c6

Please sign in to comment.