default value in password field

following are the code in view section of the project. there two password field. But the first password fiel contain default value like this ‘********’

<div class="row">

	&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'password'); ?&gt;


	&lt;?php echo &#036;form-&gt;passwordField(&#036;model,'password',array('size'=&gt;32,'maxlength'=&gt;32)); ?&gt;


	&lt;?php echo &#036;form-&gt;error(&#036;model,'password'); ?&gt;


&lt;/div&gt;

<div class="row">

	&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'password_repeat'); ?&gt;


	&lt;?php echo &#036;form-&gt;passwordField(&#036;model,'password_repeat',array('size'=&gt;32,'maxlength'=&gt;32)); ?&gt;


	&lt;?php echo &#036;form-&gt;error(&#036;model,'password_repeat'); ?&gt;


&lt;/div&gt;

how to avoid the default value in password field…

You can assign an empty value like


$model->password='';

or use

$model->unsetAttributes() - http://www.yiiframework.com/doc/api/1.1/CModel#unsetAttributes-detail

You are probably using an existing model.

So, if you are creating a new entry, use a new model, too.

If you are updating it and don’t want to show the current password, you can clean the password value in the controller. Note: You may have to handle the case when the user doesn’t update the password. Better yet: remove the password fields and have an action and view just for changing passwords.

the problem solved… You guys are so encouraging to new YII users like me…

thanks a lot …

Safeer, please share what you did so new Yii users can learn.

staff from YII give quick response to any doubts … in YII framework…!

Please safeer, could you write the Yii team response?

Thanks.