diff --git a/composer.json b/composer.json index f5e07e0..16e8024 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "wbraganca/yii2-dynamicform", + "name": "soareseneves/yii2-dynamicform", "description": "It is widget to yii2 framework to clone form elements in a nested manner, maintaining accessibility.", "keywords": [ "wbraganca", @@ -26,8 +26,8 @@ ], "require": { "yiisoft/yii2": "~2.0.5", - "symfony/css-selector": "~2.8|~3.0", - "symfony/dom-crawler": "~2.8|~3.0" + "symfony/css-selector": ">=2.8 <6.0", + "symfony/dom-crawler": ">=2.8 <6.0" }, "autoload": { "psr-4": { diff --git a/src/DynamicFormWidget.php b/src/DynamicFormWidget.php index 4fe09fd..d449655 100644 --- a/src/DynamicFormWidget.php +++ b/src/DynamicFormWidget.php @@ -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); }