Yii Framework In How To Searchbox In Dropdown Search Filter

Example

1-)use yii\helpers\ArrayHelper;
2-)use app\models\Registrationform;
2-)as a database modal
3-)            [
                'attribute'=>'last_name',
               // 'filter'=>ArrayHelper::map(Registrationform::find()->asArray()->all(), 'last_name', 'last_name'),
                'filter' => ArrayHelper::map(Calculation::find()->select('ArticleGroup')->distinct()->where(['not', ['ArticleGroup' => null]])->andWhere(['not', ['ArticleGroup' => '']])->orderBy(['Type' => SORT_ASC])->all(), 'ArticleGroup', 'ArticleGroup'),

                'filterInputOptions' => ['prompt' => 'last name', 'class' => 'form-control', 'id' => null],
            ],
3-)'attribute'=>'fild name ',
3)'filter'=>ArrayHelper::map(Registrationform::find()->asArray()->all(), 'DBfildNAME', 'DBfildNAME'),

Popular posts from this blog

Yii Framework In Update Time View Image In Form

Add a new column to existing table in a migration

Ajax Toggle(on/off) on-click Update