yii2-validation

how to keep selected value on Yii2 html::dropddownlist?

泄露秘密 提交于 2019-12-02 14:33:29
i have the following code in my view: <?=Html::dropdownList('region',null, ArrayHelper::map(Ethioregion::find()->all(),'region','region'),[ 'prompt' => 'Select Region..','style'=>'width:200px',]) ?> and submit button <?= Html::submitButton('Search', ['name' => 'dele','class' => 'btn btn-primary']) ?> my code working well but I have one big problem. I select a region and click the search button, the result comes correctly, and 10 result is shown per page when I click the next page, it gives me false data, I notice this is due to the selected value on the dropdownlist is reset. I tried both