I am new to yii2. I am trying to send some parameters to an action from a view using the post method, unfortunately my action does not seem to see / accept them. Help will be appreciated.
my column action looks something like this:
'buttons'=> [
'password'=> function ($url, $model, $key){
$url =$url = Url::toRoute(['users/reset-password', 'username' => $model->username]);
return Html::a('<span class="glyphicon glyphicon-asterisk"></span>',$url,[
'title'=>'Clave',
'data-confirm' => Yii::t('yii', 'Are you sure you want to change this password?'),
'data-method' => 'post',
'data' => ['username'=>$model->username, 'test-name'=>'this is just for testing'],
]);
},
.....
everything in the data parameter should be mailed, but I only get the csrf token. in advance for help.
Mamba source
share