Answer the question
In order to leave comments, you need to log in
How to merge data attributes in ajaxSubmitButton?
Good afternoon, there is such a bandura:
echo CHtml::ajaxSubmitButton
(
$model->isNewRecord ? 'Добавить номера' : 'Обновить',
Yii::app()->createUrl('sadmin/hotels/ajaxCreate'),
[
'type'=>'POST',
'data'=>'js:$("#add-user-form").serialize()',
// Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken
'success'=>'js:function(data)
{alert(data);}',
],
'data'=>
[
Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question