PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 30, 2023
Let's talk code, commerce and open source.

Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page

Learn how to upgrade to the latest version.

HtmlColumn Type

Displays raw data without any escaping. Can be used to display HTML in grid.

Using this column could open you to XSS attacks, if you are using this column take steps to make sure that data displayed by this column is secure. If you are using form together with grid, safe way is to use FormattedTextareaType .

Available options

Properties Type Expected value
field string required The record field name that the column displays.

Example usage

use PrestaShop\PrestaShop\Core\Grid\Column\Type\Common\HtmlColumn;
use PrestaShop\PrestaShop\Core\Grid\Column\ColumnCollection;

$htmlColumn = new HtmlColumn('description');
     'field' => 'description',

$columns = new ColumnCollection();