'buttons'=>array( 'preview'=>array( 'type'=>'submit', 'label'=>yii::t('core','Show preview'), ), 'draft'=>array( 'type'=>'submit', 'label'=>yii::t('core','Save draft'), ), 'submit'=>array( 'type'=>'submit', 'label'=>yii::t('core','Submit'), ), CHtml::link(yii::t('core','Cancel'),yii::app()->homeUrl), ),
控制器:
if($form->submitted('submit')) $model->status=Post::STATUS_PROPOSED; else $model->status=Post::STATUS_DRAFT;
<input type="submit" name="submityes" value = <?php echo Yii::t('common', "Submit")?>> if(isset($_POST['submityes']))
希望本文所述对大家基于Yii框架的PHP程序设计有所帮助。