Hello,
I used a widget in yii and need to popup a php file in a window in yii2.
Thanks
Hello,
I used a widget in yii and need to popup a php file in a window in yii2.
Thanks
You can call another view in a popup/modal windows using bootstrap as follows:
<?php
Modal::begin([
'toggleButton' => [
'label' => '<i class="glyphicon glyphicon-plus"></i> Add',
'class' => 'btn btn-success'
],
'closeButton' => [
'label' => 'Close',
'class' => 'btn btn-danger btn-sm pull-right',
],
'size' => 'modal-lg',
]);
$myModel = new \frontend\models\SomeModel;
echo $this->render('/someview/create', ['model' => $myModel]);
Modal::end();
?>
Thank you
Hi sifa786, it works, but it can not save the data from the popup form to the database. is there any code missing?