How you place html inside label in cakephp3?
I need to achieve * Name:
using the code below
<?php
echo $this->Form->input ( 'name', [
'label' => [
'text' => '<span class="red">*</span> Name:',
'class' => 'col-sm-12 col-md-2 col-lg-1 control-label'
],
'class' => 'form-control',
'rows' => 1
] );
Pretty much as always, use the escape
option.
echo $this->Form->input('name', [
'label' => [
// ...
'escape' => false
],
// ...
]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With