Installation guide
Это содержимое пока не доступно на вашем языке.
System requirements
Section titled “System requirements”PHP8.3 or higher with thedomextension.Composerfor dependency management.Yii22.0.55 or higher, or the22.0.xdevelopment line; the application opts into it by requiringyiisoft/yii2:22.0.x-dev. Earlier 2.0 releases are affected by security advisories, the most recent being CVE-2026-39850.symfony/css-selectorandsymfony/dom-crawler6.4, 7.x or 8.x (8.x requires PHP 8.4).
Installation
Section titled “Installation”composer require --prefer-dist yii2-extensions/dynamicform:^2.0Assets
Section titled “Assets”The widget registers Yii2\Extensions\DynamicForm\DynamicFormAsset, which depends on yii\web\JqueryAsset and
yii\widgets\ActiveFormAsset. Yii’s asset manager publishes the plugin shipped with the package; no Node.js build is
needed for the widget. The application must provide jQuery at the path used by its installed JqueryAsset:
@bower/jquery/dist for Yii 2.0.55, or @npm/jquery/dist for Yii 22. Keep any deliberate asset-bundle overrides.
Yii 22 client validation
Section titled “Yii 22 client validation”Yii 22 only suggests the jQuery client-script implementation. Install it explicitly alongside the development Yii version:
composer require --prefer-dist yiisoft/yii2:22.0.x-dev yiisoft/yii2-jquery:dev-masterRegister its bootstrap before creating forms and validators, merging this entry into the application’s existing bootstrap list:
return [ 'bootstrap' => [ \yii\jquery\Bootstrap::class, ],];Provide the jQuery distribution at @npm/jquery/dist, for example through the application’s npm assets and @npm
alias, or configure yii\web\JqueryAsset to use an existing jQuery distribution. Registering the assets alone does not
configure Yii 22’s ActiveForm client validation. Verify yii.activeForm is initialized and newly inserted rows
validate in a real browser; the package’s browser suite currently exercises Yii 2.0.55, not Yii 22.
Debug and production assets
Section titled “Debug and production assets”The bundle loads yii2-dynamic-form.js when YII_DEBUG is true and yii2-dynamic-form.min.js otherwise. Configure
the bundle through the asset manager to select the files yourself:
return [ 'components' => [ 'assetManager' => [ 'bundles' => [ Yii2\Extensions\DynamicForm\DynamicFormAsset::class => [ 'js' => ['yii2-dynamic-form.js'], ], ], ], ],];