How to set field size in CMaskedTextField

How does one set the html size= value in:

<?php $this->widget(‘CMaskedTextField’,array(‘model’=>$model,‘attribute’=>‘home_phone’,‘mask’=>‘999-999-9999’, ));?>


Did you try this?

<?php $this->widget(‘CMaskedTextField’,array(‘model’=>$model,‘attribute’=>‘home_phone’,‘mask’=>‘999-999-9999’,‘size’=>20 ));?>

Yes, and this returns:

Property "CMaskedTextField.size" is not defined.

Try set width in CSS or

<?php $this->widget('CMaskedTextField',array('model'=>$model,'attribute'=>'home_phone','mask'=>'999-999-9999',htmlOptions=>array('size'=>20) ));?>												

Thank you qwerty,

The htmlOptions though needs to be ‘htmlOptions’

This solved my problem

:) I am glad that I could help