title: Render View Via Bootstrap Modal
body: <p>I need to use bootstrap modal to load form , how I can call bootstrap modal with parameters via link ?</p>
  
  <p>View:</p>
  
  <pre><code>&lt;?php echo CHtml::link(Yii::t('app','addaction'),'#myModal',array('class'=&gt;'btn btn-primary','data-toggle'=&gt;'modal')) ;?&gt;
  &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
  
  &lt;!-- Bootstrap modal dialog --&gt;
  &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;&lt;?php echo Yii::t('app','AddAction'); ?&gt;&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;?php echo $this-&gt;renderPartial('_form', array('model'=&gt;$model,'productId'=&gt;$productId));  // I need $productId to by dynamic related to link 
                  ?&gt;              
              &lt;/div&gt;
  
          &lt;/div&gt;&lt;!-- /.modal-content --&gt;
      &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
  &lt;/div&gt;&lt;!-- /.modal --&gt;
  </code></pre>
  
  <p>Controller : </p>
  
  <pre><code>public function actionCreate()
      {
      $model=new Actions;
      $productId=intval($_GET['productId']);
  
      // Uncomment the following line if AJAX validation is needed
      $this-&gt;performAjaxValidation($model);
  
      if(isset($_POST['Actions']))
      {
          $model-&gt;attributes=$_POST['Actions'];
  
          $model-&gt;product_id=$productId;
          if($model-&gt;validate()){
              $model-&gt;save(false);
              $message=Email::setJavaMessage('success',Yii::t('app','sm'),Yii::t('app','actionWasAdded'));
              echo CJSON::encode(array('status' =&gt; 'success','message'=&gt;$message));
              Yii::app()-&gt;end();
          }else{
              $error = CActiveForm::validate($model);
              if($error!='[]')
                  echo $error;
              Yii::app()-&gt;end();
          }
      }
      if(Yii::app()-&gt;request-&gt;getIsAjaxRequest())
          echo $this-&gt;renderPartial('_form',array('model'=&gt;$model,'productId'=&gt;$productId),false,true);//This will bring out the view along with its script.
  
      else
          $this-&gt;render('create',array(
                  'model'=&gt;$model,'productId'=&gt;$productId));
  }
  </code></pre>
  
  <p>So with above code form is work with validation also, the problem if I need to add dynamic parameters to link how to ?
  For example : use it in CRGidview via update function then the $product_id will change for every row related to values in database .</p>