Render html in yii2 Gridview Widget

The way I pass values ​​in a grid

enter image description here

but instead of links, I see a text value.

enter image description here

How can I do html rendering instead of text?

+4
source share
1 answer

In the link column configuration, add:

'format' => 'html',

or if you want to add additional markup

'format' => 'raw',

In case, rawdo not forget to encode the values ​​coming from external users, because they are not executed automatically.

+8
source

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


All Articles