Customised ActionColumn
worked perfectly on my GridView
, until I added an ActiveForm
on the GridView
so I can select multiple rows (with CheckboxColumn
) and run the action on the whole items.
Nothing happen when I click on the action items, but it works when I copy/paste the path on the browser.
<?php $form = ActiveForm::begin(); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'showHeader' => true,
'showOnEmpty'=>false,
'formatter' => ['class' => 'yii\i18n\Formatter','nullDisplay' => '0'],
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'Referral',
'Membership',
/*other attributes*/
['class' => 'yii\grid\ActionRef'],
['class' => 'yii\grid\CheckboxColumn'],
],
]); ?>
<input type="button" class="btn btn-danger" value="Disable" id="DisableButton" >
<?php ActiveForm::end(); ?>
My "Disable" Button work perfectly in the form.
I tried to start the ActiveForm
after GridWiew
, but the button (naturally) didn't work.