PHP code example of easydowork / selectpage

1. Go to this page and download the library: Download easydowork/selectpage 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/ */

    

easydowork / selectpage example snippets


<?= $form->field($model, 'select')->widget(\easydowork\selectpage\SelectPage::class,[
    'pluginOptions' => [
        'data' => [
            [
              'id' => 1,
              'name' => 'test1',
            ],
            [
              'id' => 2,
              'name' => 'test2',
            ]
        ],
    ]
]) 

// Multiple select without model
echo \easydowork\selectpage\SelectPage::widget([
    'name' => 'selectPage',
    'value' => '1',
    'data' => [
        [
            'id' => 1,
            'name' => 'selectPage',
        ]
    ],
    'options' => [
        'id' => uniqid(),
    ]
]);