Sasha
Sasha

Reputation: 8695

Yii2 - active form set empty value on update

I am trying to make update password functionality, but at the moment when I use active record to create form, password field is populated with user password. How can I omit this? This is the code used for generating password field (rest of the form is standard active form template):

<?php echo $form->field($model, 'password')->passwordInput() ?>

Upvotes: 0

Views: 3665

Answers (1)

jflizandro
jflizandro

Reputation: 632

Try this..

<?php echo $form->field($model, 'password')->passwordInput(['value'=>'']) ?>

Upvotes: 5

Related Questions