Ismael
(Shalanga)
June 27, 2009, 6:16pm
1
I hope this is the right place to say this.
In view, crud generate this:
<?php echo CHtml::activeTextField($model,'endereco',array('size'=>60,'maxlength'=>255)); ?>
I think we don't need 'size' => 60 anymore.
We can clean the code and let the css take care of this:
div.yiiForm input[type=text]
{
width:400px;
}
Not big deal I know…
qiang
(Qiang Xue)
June 28, 2009, 1:14pm
2
The size attribute is generated based on the corresponding column length information in db. The code generated by crud mainly serves as a good start point. You are free to modify it according to your needs.
Ismael
(Shalanga)
June 28, 2009, 4:00pm
3
You are wrong I think.
Maxlength are created as varchar length in DB, not SIZE !
That was my point!
qiang
(Qiang Xue)
June 28, 2009, 4:05pm
4
I didn't say size equals to varchar length… My point is that you can modify the generated code based on your needs.