Project

General

Profile

Actions

Bug #90542

closed

invertStateDisplay not evaluated in flexforms

Added by B. Kausch over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2020-02-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.4
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

The TCA option invertStateDisplay for checkboxes is not evaluated when used in flexforms. The reason for this is a strict comparison when rendering (see https://forge.typo3.org/projects/typo3cms-core/repository/revisions/master/entry/typo3/sysext/backend/Classes/Form/Element/CheckboxToggleElement.php#L176). Because flexform values are strings, the comparison evaluates to false.

An easy fix would be to force the invertStateDisplay value to a boolean while sanitizing: https://forge.typo3.org/projects/typo3cms-core/repository/revisions/master/entry/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaCheckboxItems.php#L131

Actions

Also available in: Atom PDF