karnbrockgmbh / yii2-modal-ajax

MIT License
13 stars 8 forks source link

Modal not dispalyed #5

Open marsele190 opened 8 years ago

marsele190 commented 8 years ago

Hi. I am new in Yii. I followed the installation guide. I changed my controller action. But I can't catch the following:

<?php
use karnbrockgmbh\modal\Modal;

Modal::begin([
    'id' => 'createCompany',
    'url' => Url::to(['/partner/default/create']), // Ajax view with form to load
    'ajaxSubmit' => true, // Submit the contained form as ajax, true by default
    // ... any other yii2 bootstrap modal option you need
]);
Modal::end();

What does it mean: //Ajax view with form to load? Is 'create' in '/partner/default/create' a standard create view (CRUD generated). Should I create a new View and place this code inside it? How then to call it? I tried to replace code inside View.php or Create.php (standard CRUD generated) but after click on Create button(inside controller/index) I have just a blank page and no Modal.

marsele190 commented 8 years ago

So, I understood it should be a separate View. But anyway I can't see a form inside a Modal. Even after changes in js file suggested in #3...

marsele190 commented 8 years ago

I placed everything inside my project. It works. Data is storing in DB but Modal window is not hidden after submit. Is it correct? Should I hide it by myself in kbModalSubmit event? Or smth wrong?