title: How to enable hiddenField in Yii Framework?
body: <p>I am using a Yii hiddenField in a CActiveForm widget. I have saved this hidden field value in database. There is no issue with storing in DB with Controller action at all. after saving this the hidden field should display the value. And how can I populate the form with the database stored value. Or how to refer some other field in the form to contain value from DB after save is processed. </p>
  
  <pre><code>&lt;?php echo $form-&gt;hiddenField($model,'ad_form_id',array('value'=&gt;$base)); ?&gt;
  </code></pre>
  
  <p>My controller action</p>
  
  <pre><code>  public function actionBCFormFields()
  {
       $model=new BCFormField();
       if(isset($_POST['BCFormField']))
      {
                      $model-&gt;ad_form_id = $_POST['BCFormField']['ad_form_id'];
          $model-&gt;attributes=$_POST['BCFormField'];       
          if ($model-&gt;save()){
                           echo'saved';                   
      }
  $this-&gt;redirect(array('create',  
     'crm_base_form_field_id'=&gt;$model-&gt;crm_base_form_field_id));
      }
  </code></pre>