Project

General

Profile

Actions

Bug #88240

closed

ext:form "Inspector-PropertyGridEditor" does not evaluate defaultValue in all scenarios

Added by Ralf Zimmermann almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2019-04-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

Description

Within the ext:form form editor backend Module, there is an inspectors for "multi value" properties (e.g. for RadioButton or SingleSelect) called "Inspector-PropertyGridEditor".
Within this inspector you can choose a preselected value

This preselection will be written to the form definition correctely (property "defaultValue"), but the inspector code does not interprete the "defaultValue" in the right way in some scenarios.

If you use integer numbers as value, the "properties.options" property keys within the form definition will be written as integer numbers, but the "defaultValue" property will be written as string.
The result is no preselection (visual) within the form editor after the reloading of the "Inspector-PropertyGridEditor" (e.g. after clicking the "save" button).

Expected behavior: A preselection within the form editor must be displayed.

Current output of the form definition after saving (does not show the preselection within the form editor):

type: Form
identifier: t1
label: test
prototypeName: standard
renderables:
    type: Page
    identifier: page-1
    label: Step
    renderables:
      -
        type: RadioButton
        identifier: radiobutton-1
        label: 'Radio button'
        defaultValue: '1'
        properties:
          options:
            1: 'yes'
            2: 'no'

Working example (note that "defaultValue" is an integer):

type: Form
identifier: t1
label: test
prototypeName: standard
renderables:
    type: Page
    identifier: page-1
    label: Step
    renderables:
      -
        type: RadioButton
        identifier: radiobutton-1
        label: 'Radio button'
        defaultValue: 1
        properties:
          options:
            1: 'yes'
            2: 'no'

Files

be-yes.png (5.9 KB) be-yes.png Ralf Zimmermann, 2019-04-28 12:37

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #87353: Ext. FORM: Radio-Buttons with "defaultValue" doesn't work properlyClosed2019-01-07

Actions
Actions

Also available in: Atom PDF