I want the line column values in a form field so the value can be edited. I'm not trying to override the value in the database. Just want it to be editable for immediate printing.
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'home_team',
'away_team',
'line',
'over_under',
'home_fd',
],
]); ?>
You can specify value and format params of the DataColumn:
[
'attribute' => 'home_team',
'value' => function($model){
return Html::textInput('', $model->home_team);
},
'format' => 'raw'
],
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With