---
title: "Format.replace ViewHelper <liaform:format.replace>"
manual: "LIA Form"
version: "2.2"
permalink: "https://docs.typo3.org/permalink/lia/lia_form:lia-liaform-format-replace@2.2"
source: "ViewHelpers/LiaForm/Format/Replace.rst"
rendered: "2026-09-29T13:27:41+00:00"
---

# Format.replace ViewHelper `<liaform:format.replace>` {#lia-liaform-format-replace}

This ViewHelper replace a substring of a give content by given string.
This ViewHelper is used in the DataProtection form field to set the link to the configured privacy page.

## Example {#example}

```html
{f:link.typolink(parameter: element.renderingOptions.pageUid) -> f:variable(name: 'link')} {formvh:translateElementProperty(element: element, property: 'label') -> f:variable(name: 'translation')}
<f:format.raw>
  <liaform:format.replace substring="%s" content="{translation}" replacement="{link}" />
</f:format.raw>
```

**Arguments**

The following arguments are available for the format.replace ViewHelper:

-   **caseSensitive**

    -   *Type:* boolean
    -   *Default:* true

    If true, perform case-sensitive replacement

-   **content**

    -   *Type:* string

    Content in which to perform replacement

-   **count**

    -   *Type:* int

    Maximum number of times to perform replacement

-   **replacement**

    -   *Type:* string
    -   *Default:* ''

    Replacement to insert

-   **substring**

    -   *Type:* string
    -   *Required:* true

    Substring to replace
