当我单击Gridview按钮时如何显示表单?
基本上,我想填充一种包含下拉菜单和“提交”按钮的表单。
通过单击按钮,我想在弹出框中填充表格。
'panel' => [
'type' => 'info',
'after' => Html::button('<i class="glyphicon glyphicon-plus"></i> Allocate', [ 'id' => 'modalButton', 'class' => 'btn btn-success'),
'showFooter' => false,
使用以下代码并解决了我的问题。
$this->registerJs("$(function() {
$('#popupModal').click(function(e) {
e.preventDefault();
$('#modal').modal('show').find('.modal-content')
.load($(this).attr('href'));
});
});");
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句