---
title: "Feature: #102077 - Allow custom default value in getFormValue() conditions function"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-102077-1696240251"
source: "Changelog/13.0/Feature-102077-AllowCustomDefaultValueInGetFormValueConditionsFunction.rst"
typo3-version: "13.0"
typo3-major: 13
type: "feature"
issue: 102077
forge: "https://forge.typo3.org/issues/102077"
tags: ["YAML", "ext:form"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Feature: #102077 - Allow custom default value in getFormValue() conditions function {#feature-102077-1696240251}

See [forge#102077](https://forge.typo3.org/issues/102077)

## Description {#description}

The `getFormValue()` function can be used in conditions of form variants to
safely retrieve form values. Before, `null` was returned as default value. This
made it impossible to use this, for example, with the `in` operator to check
values in multi-value form fields. An additional check was necessary to avoid
type issues:

```yaml
variants:
  - identifier: variant-1
    condition: 'getFormValue("multiCheckbox") && "foo" in getFormValue("multiCheckbox")'
```

A second argument has been added to this function to set a custom default value.
This allows shortening conditions accordingly:

```yaml
variants:
  - identifier: variant-1
    condition: '"foo" in getFormValue("multiCheckbox", [])'
```

## Impact {#impact}

Form variant conditions can be shortened.
