Combine table fields in templates

@KevinPfeifer Kevin Pfeifer
Tue, 03 Sep 2024 17:57:36 +0000

1. HTML select elements (or more directly option element) can’t contain further HTML. Its a browser standard as e.g. mobile devices show a completely different view for selecting an option as your desktop browser does. If you want to style a select, you need to use a JS library like select2 or slim-select to transform the HTML native select into “other” HTML which represents a select and can be styled.

2. Those links don’t “properly” use the because CakePHP automatically escapes Title’s for generated links to prevent XSS. If you don’t know what that is you have much to learn
If you don’t care about XSS or truley trust your users (which you shouldn’t) you can prevent that logic via e.g.

echo $this->Html->link(
"Some Text with a break",
    ['controller' => 'Pages', 'action' => 'display', 'home'],
    ['escapeTitle' => false]
);