Action

Hi there.

I have two controllers guardian and other is students guardian. I want to render form of guardian from TbModal in studentsGuardian View. Form is diplayed but the problem is that when i inspect element it shows

action=studentsGuardian

I want to use


'action'=>Ccontroller::createUrl('/Guardian/create')

but i dont know where to put it means in which form i have to put it. Here is my code in studentsGuardian` index view


/* @var $this StudentsGuardianController */

/* @var $dataProvider CActiveDataProvider */

<?php $this->beginWidget('bootstrap.widgets.TbModal',array('id'=>'myModal')); ?>

<div class="modal-wide" >

<div class="modal-header">

    <a class="close" data-dismiss="modal">&times;</a>

</div>

<div class="modal-body">

    <?php

    $model=new Guardian;

    echo $this->renderPartial('/Guardian/_form', array('model'=>$model));

    

    ?>

</div>

</div>

<?php $this->endWidget(); ?>

<?php $this->widget('bootstrap.widgets.TbButton', array(

    'label'=>'Create Guardian',

   // 'action'=>Ccontroller::createUrl('/Guardian/create'),

    'type'=>'danger',

    'htmlOptions'=>array(

        'data-toggle'=>'modal',

        'data-target'=>'#myModal',

    ),

)); ?>