I m new in Yii . I hve given a button in post view page now I want to write code for insertion in some other table.actually i m doing for job portals and in post view page button is for appliyng the perticular job and I want to insert the userid,useremail,uername and postjob id and postjob title.pls help me
Page 1 of 1
code for Button
#2
Posted 02 November 2011 - 01:26 AM
<?php
$form=$this->beginWidget('CActiveForm', array('id'=>'form','enableClientValidation'=>true,
'clientOptions'=>array('validateOnSubmit'=>true,),
));
?>
...
....
Add Required Controls here and Put inside
$form->
..
<?php
$this->widget('zii.widgets.jui.CJuiButton', array('buttonType'=>'submit','name'=>'btnSubmit',
'value'=>'Submit',
'caption'=>$model->isNewRecord ? 'Create' : 'Save',
)
);
?>
now in Controller u can Handle event Action
$form=$this->beginWidget('CActiveForm', array('id'=>'form','enableClientValidation'=>true,
'clientOptions'=>array('validateOnSubmit'=>true,),
));
?>
...
....
Add Required Controls here and Put inside
$form->
..
<?php
$this->widget('zii.widgets.jui.CJuiButton', array('buttonType'=>'submit','name'=>'btnSubmit',
'value'=>'Submit',
'caption'=>$model->isNewRecord ? 'Create' : 'Save',
)
);
?>
now in Controller u can Handle event Action
Share this topic:
Page 1 of 1