assigning a class to a textfield

hi all can we assign a class to a textfield using this syntax


but when i debug i couldnt see class for this textbox.please help

it’s a feature request forum, not a support one, i.e. you chose a wrong place to post the question

NOTE: moved to proper sub-forum

As for your problem check the HTML source

<?php echo $form->textfield($model,'x',array('maxlength'=>45,'class'=>'box')); ?>

will produce

<input maxlength="45" class="box" name="Yourmodel[x]" id="Yourmodel_x" type="text" />

If you don’t have any code, it means you forgot the “echo”… if not it’s something else…

sorry for password field is it the same.I tried it but size of textarea is getting displayed