PHP code example of walkboy / yii2-filterform
1. Go to this page and download the library: Download walkboy/yii2-filterform 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/ */
walkboy / yii2-filterform example snippets
use walkboy\FilterForm\FilterForm;
$form = FilterForm::begin([
'method' => 'get',
'options' => [
'class' => 'filter-form',
'data-pjax' => 1,
]
]);
echo $form->field($searchModel, 'type')->dropDownList([
'1' => 'Foo',
'2' => 'Bar',
])->label('Type');
// insert fields here
FilterForm::end();
Pjax::begin();