Answer the question
In order to leave comments, you need to log in
Is it possible to make kartik/FileInput work in a modal window?
I have such a question, if you make a regular modal window a Modal widget, then it all works with this widget, but if I use it like this
<span class="glyphicon glyphicon-edit editQuestion" data-path="'. Url::to(['test/update', 'id' => $question->id]).'"></span>
<?php Modal::begin([
'id' => 'modal-editQuestion',
'header' => 'Редактировние вопроса',
]);
echo '<div class="modal-content"></div>';
Modal::end(); ?>
$('.editQuestion').click(function(){
let path = $(this).data('path');
$('#modal-editQuestion').modal('show')
.find('.modal-content')
.load(path);
});
Answer the question
In order to leave comments, you need to log in
Apparently the widget is not initialized. Show an action (and a view, perhaps) whose result falls into path. Apparently there are no scripts connected.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question