如何在 cakephp3 中将 html 放置在标签内?
我需要实现
* 姓名:
使用下面的代码
<?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
] );
与往常一样,使用escape option http://api.cakephp.org/3.0/class-Cake.View.Widget.LabelWidget.html#_render.
echo $this->Form->input('name', [
'label' => [
// ...
'escape' => false
],
// ...
]);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)