enhancement CHtml::activeTag

Consider adding a method to CHtml:


CHtml::activeTag(CModel $model, string $attribute, string $tag='span', array $htmlOptions=array());

Why:

I have a model with fields a, b, c.

All of them are saved and validated.

Temporarily the field c is set in a controller and not by user input.

So I need to just print it’s label and value in the form as a simple text (i mean active text) but the value needs still to be validated.

It would be nice if the value was wrapped in a span tag that automatically has ‘error’ class when the value is invalid.

Best regards.

I don’t see the point of validating if it cannot be changed/it’s not an input…