Project

General

Profile

Actions

Bug #70095

closed

Epic #69955: Optimize new Extbase/ Fluid based rewrite of EXT:form

Bug #69957: EXT:form - Fix some problems with Container elements

EXT:form - Wrong Checkbox and Radiobutton handling

Added by Ralf Zimmermann about 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2015-09-24
Due date:
% Done:

100%

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

Description

The Checkboxes and the Radiobuttons need a value at sending. If there are no values
i can not remap the data after submit / validation. To avoid this i set the values to {$elementName}-{$elementCounter} if there are no value argument is available.

Affected Parts:

  • form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Checkbox.html
  • form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Radio.html
  • form/Resources/Private/Partials/Compatibility/Show/FlatElements/Checkbox.html
  • form/Resources/Private/Partials/Compatibility/Show/FlatElements/Radio.html
  • form/Resources/Private/Partials/Default/Show/FlatElements/Checkbox.html
  • form/Resources/Private/Partials/Default/Show/FlatElements/Radio.html
  • form/Resources/Private/Partials/Default/Confirmation/FlatElements/Checkbox.html
  • form/Resources/Private/Partials/Default/Confirmation/FlatElements/Radio.html
  • TYPO3\CMS\Form\Hooks\HandleIncomingFormValues
    • the $modelValue is the value that is defined by typoscript. If the incoming date not match this value i look if the incomming data is {$elementName}-{$elementCounter}

Test:

Make a radio and / or checkboxes and give them no value (the wizard write this elements without)
If a validation fails, the checkboxes and radios must keep the checked state.
If you go to the confirmation, the labels of the checked elements must be shown.
If you go back to the form, the checkboxes and radios must keep the checked state.
If you send the mail, the mail must contain the labels of the checked elements.


Files

ext_form_70095.png (20.3 KB) ext_form_70095.png Björn Jacob, 2015-09-28 13:27

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #70122: EXT:form - Dropdown/Selectbox doesn't work in compatibility modeClosed2015-09-25

Actions
Related to TYPO3 Core - Bug #70208: EXT:form - Problems with radiogroup in emailClosed2015-09-30

Actions
Actions #1

Updated by Gerrit Code Review about 9 years 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 http://review.typo3.org/43543

Actions #2

Updated by Björn Jacob about 9 years ago

Example to test this issue.


enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1
postProcessor {
    1 = mail
    1 {
        recipientEmail = mail@email.com
        senderEmail = mail@email.com
    }
}
10 = RADIO
10 {
    name = radio
    label {
        value = Radio
    }
}
20 = CHECKBOX
20 {
    name = checkbox
    label {
        value = Checkbox
    }
}
30 = CHECKBOXGROUP
30 {
    name = checkboxgroup1
    class = fieldset-subgroup
    legend {
        value = Checkbox group
    }
    10 = CHECKBOX
    10 {
        label {
            value = Checkbox 1
        }
    }
    20 = CHECKBOX
    20 {
        label {
            value = Checkbox 2
        }
    }
    30 = CHECKBOX
    30 {
        label {
            value = Checkbox 3
        }
    }
}
40 = RADIOGROUP
40 {
    name = radiogroup1
    class = fieldset-subgroup
    legend {
        value = Radio group
    }
    10 = RADIO
    10 {
        label {
            value = Radio 1
        }
    }
    20 = RADIO
    20 {
        label {
            value = Radio 2
        }
    }
    30 = RADIO
    30 {
        label {
            value = Radio 3
        }
    }
}
50 = SUBMIT
50 {
    name = submit
    value = Submit
}
rules {
    1 = required
    1 {
        breakOnError = 0
        showMessage = 1
        message = Required
        error = This field is required
        element = radio
    }
    2 = required
    2 {
        breakOnError = 0
        showMessage = 1
        message = Required
        error = This field is required
        element = checkbox
    }
    3 = required
    3 {
        breakOnError = 0
        showMessage = 1
        message = Required
        error = This field is required
        element = checkboxgroup1
    }
    4 = required
    4 {
        breakOnError = 0
        showMessage = 1
        message = Required
        error = This field is required
        element = radiogroup1
    }
}

Actions #3

Updated by Nicole Cordes about 9 years ago

Thanks for providing the configuration to test the patch. It seems to work es expected, but I'm wondering of it is the intention, that the confirmation page shows nothing but the buttons to got back or confirm? I would have expected at least to see the labels even the value of the form elements are empty?!

Actions #4

Updated by Ralf Zimmermann about 9 years ago

I installed a fresh TYPO3 CMS master and apply this patchset. I cannot reproduce this. I add the example typoscript to the wizard and the confirmation page show the labels of the checked checkboxes / radios. The hidden fields are also set.
The question is, whats the difference to your system?

Actions #5

Updated by Björn Jacob about 9 years ago

Tested the current patchset again using the above mentioned configuration. I've created a new content element and pasted the code. Works for me on current master.

Actions #6

Updated by Gerrit Code Review about 9 years ago

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

Actions #7

Updated by Ralf Zimmermann about 9 years ago

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

Updated by David Denicolo' about 9 years ago

don't know if the same issue but if I use a radiogroup i get in the email the labels plus the value, if the value is empty I get the automatic generated one.
that just in the email, for example without value:

Anrede Herr3

if I write the Herr as value in TS

Anrede HerrHerr

thanks

Actions #9

Updated by Björn Jacob about 9 years ago

Hi David. Thx for your reply. Let's discuss this issue within a different issue. Pls see #70208. Could you provide your form setup (TypoScript)?

Actions #10

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF