I'm new to Yii framework.I'm using the form.php to update the fields of the table. So now I use this form with three submit buttons - [Save, Accept, Reject
]. The form now has the following fields.
<div class="row">
<?php //$model->ReviewedDate=date('Y-m-d H:i:s');?>
<?php echo $form->labelEx($model,'ReviewedDate'); ?>
<?php echo $form->textField($model,'ReviewedDate',array('value'=>'0000-00-00 00:00:00','readonly' => true));te ?>
<?php echo $form->error($model,'ReviewedDate'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'Approved'); ?>
<?php echo $form->textField($model,'Approved'); ?>
<?php echo $form->error($model,'Approved'); ?>
</div>
<div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array('confirm' => 'Are you sure to save')); ?></div>
Above there is Approved field.Now, when I click on save all the other fields has to be updated except for approved. (Approved is 0 by default). So when I click on Approve button it should update Approved as well as other fields. When I click on Reject, it should update the approved field to 0. How can I do this.