rpaulpen
(Remopenn)
December 16, 2008, 5:21pm
1
Hi,
I've been flipping through the class reference but can't find anywhere a list of the properties related to something like activeTextField. In the example below, the size and maxlength are set, but where can I find a list of these properties?
<?php echo CHtml::activeTextField($search,'where', array('size'=>50, 'maxlength'=>50)); ?>
Thanks,
R
qiang
(Qiang Xue)
December 16, 2008, 5:28pm
2
These are HTML tag attributes. It is not defined in Yii. You can put in anything that would result in a valid HTML tag.
KJedi
(Konstantin Mirin)
December 16, 2008, 5:30pm
3
that's propeties of HTML tag. Refer to the HTML documentation. All it does - adds key="val" parameters to the input tag.
If I write
<?php echo CHtml::activeTextField($search,'where', array('style'=>'border:solid #FF0000 3px')); ?>
it will give me an input field with red solid border, 3px width.
Just think of it as of another way for adding HTML attributes.
rpaulpen
(Remopenn)
December 16, 2008, 7:01pm
4
Thanks to both of you.
It's a very simple approach… great!
R