magicsoft / yii2-form
Magic Form
Installs: 43
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/magicsoft/yii2-form
Requires
- kartik-v/yii2-widget-activeform: ~1.4
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-09-11 16:41:08 UTC
README
Magic form fully utilizes the functionality of https://github.com/kartik-v/yii2-widget-activeform, but set the format view used by MagicModal.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist magicsoft/yii2-form "*"
or add
"magicsoft/yii2-form": "*"
to the require section of your composer.json
file.
Usage
You can use directly from a form, the widget will dynamically build the selector with dynamic query.
<?php $form = \magicsoft\form\MagicForm::begin([ 'model' => $model, 'setFormat' => true, 'formatOptions' => [ 'title' => 'My form', 'subTitle' => 'Create' ] ]); echo $form->field($model, 'name')->textInput(['maxlength' => true, 'placeholder' => 'Name']); echo $form->field($model, 'attribute_id')->widget(\magicsoft\select\MagicSelect::className(), []); $form::end(); ?>
License
MagicForm is released under the BSD 3-Clause License. See the bundled LICENSE.md
for details.