A
A
Alexander2015-05-15 08:45:57
Yii
Alexander, 2015-05-15 08:45:57

How to disable search in Yii1?

Hello everyone, I switched to yii1 not long ago and ran into a problem.
In the controller I check for empty values ​​in the form

if(count(Yii::app()->request->getParam('RefMahala')['name_'.Yii::app()->language])>0 || intval(Yii::app()->request->getParam('RefMahala',['district_id'=>null])['district_id']) > 0 ){

            }

If empty, then you need to disable the search. Google did not find anything like that, a friend suggested that you need to turn off some kind of filtering.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
matperez, 2015-05-15
@matperez

What do you mean by search? Filters in GridView? If so, then you need to change the search criteria CDbCriteria depending on these fields. They are most likely generated in the search() method of your model.

A
Andrey Sanych, 2015-05-15
@mountpoint

recently switched to yii1

forget about it and switch to yii2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question