过滤器的 yii 占位符 [英] yii placeholder for filter

查看:25
本文介绍了过滤器的 yii 占位符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 CGridview 过滤器部分,我需要放置占位符.这在 Yii 中可能吗?

In my CGridview filter section, I need to place placeholder. Is this possible in Yii?

或者通过扩展 CGridview 来容纳包含占位符的 filterOptions 标签,这是否可行.如果是,如何扩展CGridview?

Or is this possible by extending CGridview to accomodate filterOptions tag, which contains the place holder. If its, how to extend CGridview?

推荐答案

我不认为为了这个目的需要扩展类,只需使用

I don't think that extending class is need for this purpose, just use

'filter'=>CHtml::activeTextField($model, attribute, 
                 array('placeholder'=>'place holder text'))),

这篇关于过滤器的 yii 占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆