H
H
hollanditkzn2018-02-12 15:14:26
Yii
hollanditkzn, 2018-02-12 15:14:26

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(); ?>

And in jquery
$('.editQuestion').click(function(){
            let path = $(this).data('path');
            $('#modal-editQuestion').modal('show')
                .find('.modal-content')
                .load(path);
        });

That widget does not load at all, that is, it is loaded, but not loaded at all. I assume that such things do not happen to write my frontend. But I thought maybe there are still ready-made solutions for these moments

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-02-12
@webinar

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 question

Ask a Question

731 491 924 answers to any question