I am using below peice of code.
[
'attribute' => 'Application',
'format' => 'html',
'value' => function ($dataProvider) {
$student_username = $dataProvider->student_username;
return Html::a('Print', Url::toRoute(['/coordinatorpanel/print-form', 'student_username' => $student_username]),
['target' => '_blank', 'class' => 'btn btn-success center-block']);
},
]
HTML OUTPUT :
<a class="btn btn-success center-block" href="/nse/frontend/web/index.php?r=coordinatorpanel%2Fprint-form&student_username=COR39690113" target="_blank">
But, when I click on the link, I am not navigated to new tab, the request is processed in same Tab. I tried this on both 'Mozilla' and 'Chrome'.
Any help would be deeply rewared :)