Hi all
I use an CHtml::ajaxSubmitButton in my view and can’t get buttons name in my controller with $_POST[‘buttonName’].
I just need to know which Button the user has clicked on.
This has to be done in the data container of the buttons $ajaxOptions parameter but I don’t know how to do this if there is also form data that has to be send.
It doesn’t work with:
'data' => "$(this).parents('form').serialize()+'&name=buttonName'"
CHtml::ajaxSubmitButton('Button text',
Yii::app()->request->baseUrl.'/site/index',
array('cache' => false,
'type' => 'post',
'dataType' => 'html',
'success' => " do something",
array('name' => 'buttonName'));