Bug #87353

Ext. FORM: Radio-Buttons with "defaultValue" doesn't work properly

Added by Kurt Kunig 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2019-01-07
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.3
Tags:
form, radio, defaultValue
Complexity:
Is Regression:
Sprint Focus:

Description

Create a new from and put a radio-item in.
Add 2 values e.g. and put in:
1. Label = "Yes" - press tab and the label content will be inserted into the value-field: also "Yes" => Click "selected"
2. Label = "No" - press tab and the label content will be inserted into the value-field: also "No"

SAVE!

In the FE you can see that NOT "Yes" is preselected but "No" although the "defaultValue" contains 'Yes'

It only works with numeric items in the value-field!???

That's not correct, is it?

be-no.png View (5.81 KB) Ralf Zimmermann, 2019-01-31 23:44

fe-no.png View (6.3 KB) Ralf Zimmermann, 2019-01-31 23:44

fe-yes.png View (6.52 KB) Ralf Zimmermann, 2019-01-31 23:44

be-yes.png View (5.9 KB) Ralf Zimmermann, 2019-01-31 23:44

History

#1 Updated by Ralf Zimmermann about 2 months ago

I can not reproduce your issue.

"Yes" selection:

        type: RadioButton
        identifier: radiobutton-1
        label: 'Radio button'
        defaultValue: 'Yes'
        properties:
          options:
            'Yes': 'Yes'
            'No': 'No'

"No" selection:

        type: RadioButton
        identifier: radiobutton-1
        label: 'Radio button'
        defaultValue: 'No'
        properties:
          options:
            'Yes': 'Yes'
            'No': 'No'

Did you clear the cache after your changes?

#2 Updated by Kurt Kunig about 2 months ago

In my case:

properties:
options:
Telefon: Telefon
Brief: Brief
E-Mail: E-Mail
type: RadioButton
identifier: kontaktPer
label: 'Kontakt bitte per'
defaultValue: E-Mail
-

There are always the last items set!? Doesn't matter what is in the "defaultValue"!?

Also available in: Atom PDF