Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

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


This form type displays a text value without providing an interactive input to edit it. It is based on a hidden input so it could be changed programmatically, or used just to display data in a form.

Type options

Option Type Default value Description
type string hidden Input type
preview_class string text-preview Class to apply on the input
prefix string null Prefix data to prepend to the value
suffix string null Suffix data to append to the value

Code example

$builder->add('fullname_and_email', TextPreviewType::class, [
    'label' => false,
    'block_prefix' => 'searched_customer_fullname_and_email',