我试图了解在Zend中使用它的引导css中的css类。我真的想避免使用表格来格式化我的表格。您可以在下面看到的表格仅供我培训。
这是我的表单的输出:
编辑:还有一个问题:
字段的长度不同,例如Mandant的长度比Mandantidkonzern长。我非常感谢获得解决方案,以及如何解决此问题。 (注:mysql中的列长相同)
这是我的formclass的一部分(仅一部分是因为字段都一样,这很无聊):
$this->add([
'name' => 'jahrespraemie',
'type' => 'text',
'options' => [
'label' => 'Jahresprämie',
],
]);
$this->add([
'name' => 'keineabrechnungenvertrag',
'type' => 'checkbox',
'options' => [
'label' => 'Keine Abrechnungen auf diesen Vertrag:',
],
]);
$this->add([
'name' => 'kuendigung',
'type' => 'text',
'options' => [
'label' => 'Kündigung:',
],
]);
$this->add([
'name' => 'kuendigungab',
'type' => 'text',
'options' => [
'label' => 'Kuendigung ab:',
],
]);
$this->add([
'name' => 'kuendigungdatum',
'type' => 'date',
'options' => [
'label' => 'Kündigungsdatum:',
'format' => 'Y-m-d',
],
]);
在我看来,这是格式化部分:
echo $this->form()->openTag($form);
?>
<div class="form-group">
<?= $this->formElement($id) ?>
<?= $this->formElementErrors()->render($id, ['class' => 'help-block']) ?>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($nummer) ?>
<?= $this->formElementErrors()->render($nummer, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($vertragstypid) ?>
<?= $this->formElementErrors()->render($vertragstypid, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($mandantid) ?>
<?= $this->formElementErrors()->render($mandantid, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($hauptvertragid) ?>
<?= $this->formElementErrors()->render($hauptvertragid, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($mandantidkonzern) ?>
<?= $this->formElementErrors()->render($mandantidkonzern, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($versichererid) ?>
<?= $this->formElementErrors()->render($versichererid, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($gtca) ?>
<?= $this->formElementErrors()->render($gtca, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($gtcaid) ?>
<?= $this->formElementErrors()->render($gtcaid, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($niederlassungid) ?>
<?= $this->formElementErrors()->render($niederlassungid, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($maklerauftrag) ?>
<?= $this->formElementErrors()->render($maklerauftrag, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($kuendigung) ?>
<?= $this->formElementErrors()->render($kuendigung, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($kuendigungdatum) ?>
<?= $this->formElementErrors()->render($kuendigungdatum, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($vertragsbeginn) ?>
<?= $this->formElementErrors()->render($vertragsbeginn, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($analyseid) ?>
<?= $this->formElementErrors()->render($analyseid, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($analyseidfactoring) ?>
<?= $this->formElementErrors()->render($analyseidfactoring, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($zahlweise) ?>
<?= $this->formElementErrors()->render($zahlweise, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($jahrespraemie) ?>
<?= $this->formElementErrors()->render($jahrespraemie, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($keineabrechnungenvertrag) ?>
<?= $this->formElementErrors()->render($keineabrechnungenvertrag, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($geschid) ?>
<?= $this->formElementErrors()->render($geschid, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($courtage) ?>
<?= $this->formElementErrors()->render($courtage, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($mitarbeiterid) ?>
<?= $this->formElementErrors()->render($mitarbeiterid, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($provision) ?>
<?= $this->formElementErrors()->render($provision, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($mitarbeiteridext) ?>
<?= $this->formElementErrors()->render($mitarbeiteridext, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($kooperationid) ?>
<?= $this->formElementErrors()->render($kooperationid, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($beteiligung) ?>
<?= $this->formElementErrors()->render($beteiligung, ['class' => 'help-block']) ?>
</div>
</div>
<div class="row">
<div class="form-group col-sm-3">
<?= $this->formRow($koopgeschstelleid) ?>
<?= $this->formElementErrors()->render($koopgeschstelleid, ['class' => 'help-block']) ?>
</div>
<div class="form-group col-sm-3">
<?= $this->formRow($beteiligungkoopgeschstelle) ?>
<?= $this->formElementErrors()->render($beteiligungkoopgeschstelle, ['class' => 'help-block']) ?>
</div>
</div>
当然,我已经阅读了与该主题相关的所有其他文章,但是我无法正确理解所有详细信息,如屏幕截图所示。因此,感谢您提供任何有用的解释。