如何在 yii2 中设计内联表单设计。实际上,我想在 yii2框架
中内联表单设计而不是构建表单设计<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'org_code')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'org_name')->textInput(['maxlength' => true]) ?>
<?php ActiveForm::end(); ?>
答案 0 :(得分:1)
试试这个: -
<?php $form = ActiveForm::begin(); ?>
<div class="row">
<div class="col-sm-6">
<?= $form->field($model ,'org_name')?>
</div>
<div class="col-sm-6">
<?= $form->field($model ,'org_name')?>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<?= $form->field($model ,'org_name')?>
</div>
</div>
<?php ActiveForm::end(); ?>
阅读有关Bootstrap Grid类
的更多信息