Skip to content

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

@mimaoffice

Description

@mimaoffice
  • bug?

  • question

  • CakePHP Version: 3.6.12

  • Plugin Version/Branch: dev-4.0.1-alpha

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions