Reputation: 1025
I don't want to show password while edit profile. I am using below syntax for password
<?= $form->field($model, 'password',['template' => "{input}"])->passwordInput(['maxlength' => 255]) ?>
How can i pass null values for password ?
Upvotes: 0
Views: 667
Reputation: 14459
You can do:
<?= $form->field($model, 'password',['template' => "{input}"])->passwordInput(['maxlength' => 255,'value'=>'']) ?>
Key note is 'value'=>''
However, it is suggested to do like below in your controller:
$model->password=NULL;
Or
$model->password="";
Then, render your view.
Upvotes: 1