Cakephp3: visualize / evaluate HTML inside formhelper tags

How do you put html inside a 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 ] ); 
+6
source share
1 answer

As always, use the escape option .

 echo $this->Form->input('name', [ 'label' => [ // ... 'escape' => false ], // ... ]); 
+14
source

Source: https://habr.com/ru/post/981126/


All Articles