Project

General

Profile

Actions

Bug #76019

closed

EXT:form - problem with form element RADIOGROUP

Added by Hans-Georg Althoff almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2016-05-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I have updated from 7.6.4 to 7.6.6.
If I now go to my mail form and start the wizard, the form will not displayed anymore. It just empty.

Actions #1

Updated by Hans-Georg Althoff almost 8 years ago

If I start a new form with the wizard, it will be displayed.

But my old forms, opened with the wizard, will not displayed. The shown only a empty Form, just the headline is displayed.

Here is the code of one of the old form:

dir = ltr
title = Kontaktanforderung
enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1
postProcessor {
    1 = mail
    1 {
        recipientEmail = Hans-Georg@Althoff-Fam.de
        senderEmail = noreply@Althoff-Fam.de
        senderNameField = firstName lastName
        subject = Kontaktdatenanforderung Impressum
        message {
            success = Text
            success {
                value (
                                <h2>Danke für ihre Anfrage</h2>
                                <p>Ich werde sobald wie möglich mit Ihnen in Kontakt treten.</p>
                )
            }
        }
    }
}
10 = FIELDSET
10 {
    class = creq
    legend {
        value = Kontaktformular
    }
    10 = FIELDSET
    10 {
        class = creq fieldset-horizontal label-below
        10 = RADIOGROUP
        10 {
            class = creq fieldset-horizontal label-below
            name = sex
            required = required
            10 = RADIO
            10 {
                type = radio
                size = 10
                label {
                    value = Frau
                }
                layout (
                    <input />
                    <label />
                )
            }
            20 = RADIO
            20 {
                type = radio
                label {
                    value = Herr
                }
                layout (
                    <input />
                    <label />
                )
            }
        }
        20 = TEXTLINE
        20 {
            type = text
            name = titel
            size = 25
            label {
                value = Titel
            }
            layout (
                <input />
                <label />
            )
        }
    }
    20 = FIELDSET
    20 {
        class = creq fieldset-horizontal label-below
        10 = TEXTLINE
        10 {
            type = text
            name = firstName
            required = required
            size = 30
            label {
                value = Vorname *
            }
            layout (
                <input />
                <label />
            )
        }
        20 = TEXTLINE
        20 {
            type = text
            name = lastName
            required = required
            size = 30
            label {
                value = Nachname *
            }
            layout (
                <input />
                <label />
            )
        }
    }
    30 = FIELDSET
    30 {
        class = creq  fieldset-horizontal label-below
        10 = TEXTLINE
        10 {
            type = text
            name = street
            required = required
            size = 50
            label {
                value = Straße *
            }
            layout (
                <input />
                <label />
            )
        }
        20 = TEXTLINE
        20 {
            type = text
            name = streetnumber
            required = required
            size = 10
            label {
                value = Nr. *
            }
            layout (
                <input />
                <label />
            )
        }
    }
    40 = FIELDSET
    40 {
        class = creq fieldset-horizontal label-below
        10 = TEXTLINE
        10 {
            type = text
            name = zip
            required = required
            size = 10
            label {
                value = PLZ *
            }
            layout (
                <input />
                <label />
            )
        }
        20 = TEXTLINE
        20 {
            type = text
            name = town
            required = required
            size = 50
            label {
                value = Ort *
            }
            layout (
                <input />
                <label />
            )
        }
    }
    50 = FIELDSET
    50 {
        class = creq fieldset-horizontal label-below
        10 = TEXTLINE
        10 {
            type = text
            name = country
            required = required
            size = 66
            label {
                value = Land/Staat *
            }
            layout (
                <input />
                <label />
            )
        }
    }
    60 = FIELDSET
    60 {
        class = creq fieldset-horizontal label-below
        10 = TEXTLINE
        10 {
            type = tel
            name = phone
            required = required
            size = 20
            label {
                value = Telefon *
            }
            layout (
                <input />
                <label />
            )
        }
        20 = TEXTLINE
        20 {
            type = email
            name = email
            placeholder = Max.Mustermann@Domain.de
            required = required
            size = 40
            label {
                value = E-Mail *
            }
            layout (
                <input />
                <label />
            )
        }
    }
    70 = FIELDSET
    70 {
        class = creq fieldset-horizontal label-below
        10 = TEXTLINE
        10 {
            type = text
            name = company
            size = 66
            label {
                value = Firma
            }
            layout (
                <input />
                <label />
            )
        }
    }
    80 = FIELDSET
    80 {
        class = creq fieldset-horizontal label-below
        10 = TEXTAREA
        10{
            cols = 50
            rows = 5
            name = reason
            placeholder = Begründung für die Kontaktanforderung
            required = required
            label {
                value = Grund der Kontaktaufnahme *
            }
            layout (
                <textarea />
                <label />
            )
        }
    }
    90 = TEXTBLOCK
    90 {
        text (

    <p>* Diese Felder müssen ausgefüllt werden.</p></br>

        )
    }
}
20 = SUBMIT
20 {
    type = submit
    name = 10
    value = Formular absenden
}
rules {
    1 = required
    1 {
        showMessage = 
        message = Required
        error = Diese Angabe wird benötigt!
        element = email
    }
    2 = email
    2 {
        showMessage = 
        message = (john.doe@domain.com)
        error = Dies ist keine gültige E-Mail-Adresse!
        element = email
    }
    3 = length
    3 {
        showMessage = 
        message = The length of the value must have a minimum of %minimum characters
        error = Der Text enthält weniger als %minimum Zeichen
        minimum = 20
        maximum = 500
        element = reason
    }
    4 = required
    4 {
        showMessage = 
        message = Required
        error = Eine Angabe wird benötigt!
        element = sex
    }
}

Actions #2

Updated by Joris Willems almost 8 years ago

I am not from the core team, just a user reading the activity stream on the forge.
If you recreate one of the forms using the wizard and compare the typoscript output with the typoscript from the form you recreated, can you see any differences when you compare them?

Actions #3

Updated by Björn Jacob almost 8 years ago

  • Subject changed from EXT:form 7.6.6 Wizard don't work anymore to EXT:form - problem with form element RADIOGROUP
  • Status changed from New to Accepted

I'm having the same problem as described by Hans. We have to further investigate the problem. There seems to be a problem with RADIOGROUP (again).

Nevertheless, it is not a good idea to load the form provided above within the form wizard. As soon as you hit the save button in the form wizard, some of your custom changes will be lost. For example, you're using .layout settings. This is not supported by the form wizard. So please do not use the wizard to change your custom form.

Actions #4

Updated by Martin Kutschker almost 8 years ago

The RADIO elements require a value attribute. But that's only true when the RADIO element is within a RADIOGROUP element.

Actions #5

Updated by Björn Jacob almost 8 years ago

  • Status changed from Accepted to In Progress
Actions #6

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from In Progress 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/48591

Actions #7

Updated by Gerrit Code Review almost 8 years ago

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

Actions #8

Updated by Björn Jacob almost 8 years ago

Without the patch: when a value of the radiogroup/ checkboxgoup is missing, the wizard "dies".
With the patch: even when a value attribute is missing the wizard still works as expected.

For testing:

Step 1

UserTS: setup.default.tx_form.showWizardByDefault = 0

Step 2


prefix = tx_form
confirmation = 1
postProcessor {
    1 = mail
    1 {
        recipientEmail = 
        senderEmail = 
    }
}
10 = RADIOGROUP
10 {
    class = fieldset-subgroup
    legend {
        value = Edit this legend
    }
    name = 
    10 = RADIO
    10 {
        checked = checked
        type = radio
        label {
            value = Option 1
        }
    }
    20 = RADIO
    20 {
        type = radio
        value = Value 2
        label {
            value = Option 2
        }
    }
    30 = RADIO
    30 {
        type = radio
        value = Value 3
        label {
            value = Option 3
        }
    }
}

Step 3

User TS: setup.default.tx_form.showWizardByDefault = 1

Actions #9

Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48721

Actions #10

Updated by Andreas Häfner almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF