I have a CGridView with a phone related fields (phone numbers, imei, etc). When you start typing in the filter box for this column, you get a dropdown list of previous data you’ve typed in this field. This is not desirable behavior in this app, because a single user will be the main one using it, and she will be searching for all manner of records, not just a few… This feature, while helpful for many applications, would hinder in this case.
In the _form.php file, I’ve disabled autocomplete when entering new records by adding an htmlOption of ‘autocomplete’=>‘off’, but I can’t seem to find a way to disable this on the filter portion of a CGridview.
In my ‘columns’ definition, I’ve tried:
array ('name' => 'imei',
'filterHtmlOptions'=>array('autocomplete'=>'off')
)
and
array ('name' => 'imei',
'htmlOptions'=>array('autocomplete'=>'off')
)
But neither works… In the case of the ‘htmlOptions’, it places the autocomplete on the cell for the rows of data. With ‘filterHtmlOptions’, it places is on the filter cell, not on the <input> tag itself.
How can I add ‘autocomplete’=>‘off’ to the input tag?