0

I am using yii booster to make a password field. When I do update action, I want to show a blank field instead of showing the data taken from model. How can I make it? I don't have any clue how to do it.

This is the code in my view.

<?php
    echo $form->passwordFieldGroup($model, 'Password', array(
      'label'=>false,
      'widgetOptions'=>array(
        'htmlOptions' => array()
    )));
?>
Racil Hilan
  • 24,690
  • 13
  • 50
  • 55
puspita
  • 109
  • 1
  • 11

1 Answers1

0

You can clear the value before sending to the view ..(but be sure when you obtain the submitted values that these are properly complete before save)

public function actionUpdate($id)
{
    $model=$this->loadModel($id);

    // Uncomment the following line if AJAX validation is needed
    // $this->performAjaxValidation($model);

    if(isset($_POST['........']))
    {
        .........
    }

    // set you value  to ''
    $model->password = '';

    $this->render('update',array(
        'model'=>$model,
    ));
}
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107