I'm using Active Form for inserting data in Yii2.
我正在使用Active Form在Yii2中插入数据。
The default layout for the active form is Vertical Layout (Standard Layout) which show the label
on top of the textfield
.
活动表单的默认布局是垂直布局(标准布局),它在文本字段的顶部显示标签。
Ss there a way to use 2 layouts in the same page?
有没有办法在同一页面中使用2个布局?
In my case, I want to use Standard Layout which have Inline Layout in some 'textfield' part.
在我的例子中,我想使用标准布局,它在某些“文本字段”部分中具有内联布局。
1 个解决方案
#1
Yes, it's possible to use nested layouts:
是的,可以使用嵌套布局:
<?php $this->beginContent('@app/views/layouts/base.php'); ?>
...child layout content here...
<?php $this->endContent(); ?>
More information is available in according official docs section.
有关更多信息,请参阅官方文档部分。
#1
Yes, it's possible to use nested layouts:
是的,可以使用嵌套布局:
<?php $this->beginContent('@app/views/layouts/base.php'); ?>
...child layout content here...
<?php $this->endContent(); ?>
More information is available in according official docs section.
有关更多信息,请参阅官方文档部分。