in cakephp 4 there is a statement/method like
$this->Form->control('address_id',['options' => $addresstypes...]....
which mainly works fine. I my case I would like to change the label of an select box to an external link.
Now safe, but in this case unfortunate adding the option:
'label' => '<a href="whatever">whatever</a>'
renders my link useless because due to safety reasons it translates to:
<a href="whatever">whatever</a>
Obvious is also that this is a nice feature except you want to turn a label into a link.
Anybody an idea? Otherwise I have to rewrite a couple of hundreds of
$this->Form->control...
statements.
Thx
I can't find it explicitly documented for the label attribute, but if you add 'escape' => false
to your options in such cases, that should take care of it.