Код: Выделить всё
class TestController extends Controller
{
public function actionIndex()
{
$model = new MyModel;
$form = new CForm('application.views.tests.MyForm',$model);
if(Yii::app()->request->isAjaxRequest)
{
if ($form->submitted('MyModel'))
{
...
};
}
}
}
Код: Выделить всё
<?php
return array(
'elements'=>array(
'selectedMethod'=>array(
'type'=>'dropdownlist',
'items'=>array('method1','method2','method3'),
'ajax'=>array('type' => 'POST',
'url'=>Yii::app()->createUrl('test/index'),
'update' => '#ddlUpdate'
),
'prompt'=>'Выберите справочник'
),
),
'buttons'=>array(
'update'=>array(
'type'=>'submit',
'label'=>'обновить',
),
),
);
подробно описано.
В мануале указано так http://www.yiiframework.com/doc/api/1.1 ... ted-detail
А надо указать что-то типа "the name of the model".$buttonName string the name of the submit button