Bug #88240

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

Added by Ralf Zimmermann 5 months ago. Updated 5 months ago.

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

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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'

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


Related issues

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

History

#1 Updated by Ralf Zimmermann 5 months ago

  • Related to Bug #87353: Ext. FORM: Radio-Buttons with "defaultValue" doesn't work properly added

#2 Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60616

Also available in: Atom PDF