CakePHP-Bootstrap / cakephp3-bootstrap-helpers

CakePHP 3.x Helpers for Bootstrap 3 and 4.
https://holt59.github.io/cakephp3-bootstrap-helpers/
MIT License
130 stars 79 forks source link

FormHelper template for labelLegendHorizontal uses `legend`-tag instead of `label`-tag #165

Closed mimaoffice closed 5 years ago

mimaoffice commented 5 years ago

I'm using this code:

<?= $this->Form->control('bill_amount') ?> <!-- this is an decimal(12,2) -->
<?= $this->Form->control('bill_date') ?> <!-- this is a date -->

The first label is rendered using a label-tag and the second on using a legend-tag and in Bootstrap's CSS the font size for the legend is bigger than the one of label.

On the other side, the template for labelLegend is done using the label-tag.

In my own opinion the template for labelLegendHorizontal should also use the label-tag, like this:

'labelLegendHorizontal' => '<label class="col-form-legend {{labelColumnClass}}{{attrs.class}}"{{attrs}}>{{text}}</label>'

Bests, Michele

Holt59 commented 5 years ago

Thanks for the feedback. The problem is not the tag itself but the col-form-legend which was in one of the first bootstrap 4 release. This should be changed to col-form-label.

Holt59 commented 5 years ago

Should be fixed by fed5735ebfb8b338b77c952a565654c1753299a0.

mimaoffice commented 5 years ago

Thank you!!