PHP code example of mdmsoft / yii2-widgets

1. Go to this page and download the library: Download mdmsoft/yii2-widgets library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mdmsoft / yii2-widgets example snippets


 $form = ActiveForm::begin()

<td><?= $form->field($model,"[$key]product_id")->textInput()->label(false); 

<?= 
    GridInput::widget([
        'id' => 'detail-grid',
        'allModels' => $model->items,
        'model' => OrderItem::className(),
        'columns' => [
            ['class' => 'mdm\widgets\SerialColumn'],
            'product_id',
            'qty',
            [
                'attribute' => 'uom_id',
                'items' => [
                    1 => 'Pcs',
                    2 => 'Dozen'
                ]
            ],
            [
                'attribute' => 'tax',
                'type' => 'checkbox',
            ],
            ['class' => 'mdm\widgets\ButtonColumn']
        ],
    ]);

php composer.phar