Bug #70095
closedEpic #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
100%
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
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
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 } }
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?!
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?
Updated by Björn Jacob about 9 years ago
- File ext_form_70095.png ext_form_70095.png added
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.
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
Updated by Ralf Zimmermann about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 45e22338048ad6413413217d09e2c85f3fbbf5a3.
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
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)?
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed