Answer the question
In order to leave comments, you need to log in
How to send id to modal window from index page?
Hello everyone, tell me how you can render an action view on a modal window?
Answer the question
In order to leave comments, you need to log in
here is a piece of my code, if I understand you correctly, it will help you
'buttons' => [
'view' => function ($url, $model) {
return Html::a(
'<i class="far fa-eye"></i>',
"#",
[
'data-toggle' => 'modal',
'data-target' => '#viewSupplier-' . $model->id,
'title' => 'View',
'aria-label' => 'View',
'data-pjax' => '0',
'class' => 'btn btn-dark btn-sm text-white'
]);
}
<?php foreach ($dataProvider->models as $model) { ?>
<div class="modal fade" id="viewSupplier-<?= $model->id ?>" tabindex="-1" role="dialog"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question