Bug #71106
closedCheckbox value has consecutive number
0%
Description
I made some standard Mailforms with the System-Extension Form (6.2.0). If you submit this mailform, then you get a HTML-mail, which shows for every choosen checkbox a number. This number comes from the value of the checkbox. It is a consecutive number. This numer is confusing. Some see in it an amount of items.
The HTML-Code of frontend is as follows. See values of checkboes:
<ol> <li class="csc-form-2 csc-form-element csc-form-element-checkboxgroup"> <fieldset class="fieldset-subgroup"> <legend>Wählen Sie eine Farbe:</legend> <ol> <li class="csc-form-3 csc-form-element csc-form-element-checkbox"> <label for="field-3">gelb</label> <input type="checkbox" value="3" name="tx_form[farbwahl][]" id="field-3"> </li> <li class="csc-form-4 csc-form-element csc-form-element-checkbox"> <label for="field-4">blau</label> <input type="checkbox" value="4" name="tx_form[farbwahl][]" id="field-4"> </li> <li class="csc-form-5 csc-form-element csc-form-element-checkbox"> <label for="field-5">rot</label> <input type="checkbox" value="5" name="tx_form[farbwahl][]" id="field-5"> </li> <li class="csc-form-6 csc-form-element csc-form-element-checkbox"> <label for="field-6">grün</label> <input type="checkbox" value="6" name="tx_form[farbwahl][]" id="field-6"> </li> </ol> </fieldset> </li> <li class="csc-form-7 csc-form-element csc-form-element-checkbox"> <label for="field-7">Abc</label> <input type="checkbox" value="7" name="tx_form[abc][]" id="field-7"> </li> <li class="csc-form-8 csc-form-element csc-form-element-submit"> <input type="submit" value="Submit form" name="tx_form[6]" id="field-8"> </li> </ol>
HTML-Mail:
Wählen Sie eine Farbe: gelb 3 blau 4 rot 5 grün 6 Abc 7
The value of checkboxes are not necessary, then it already shows the label of checkboxes. The lable is enough.
Updated by Björn Jacob about 9 years ago
- Category set to Form Framework
- Status changed from New to Needs Feedback
- Assignee set to Webtech AG
Could you please provide us your form as TypoScript code. That would help testing the problem.
Updated by Webtech AG about 9 years ago
Yes of course. Here it is:
enctype = application/x-www-form-urlencoded method = post prefix = tx_form confirmation = postProcessor { 1 = mail 1 { recipientEmail = daniel.kempf@webtech.ch senderEmail = info@dasbad.ch subject = Checkbox value prüfen } } 10 = CHECKBOXGROUP 10 { class = fieldset-subgroup legend { value = Wählen Sie eine Farbe: } name = farbwahl 10 = CHECKBOX 10 { label { value = gelb } } 20 = CHECKBOX 20 { label { value = blau } } 30 = CHECKBOX 30 { label { value = rot } } 40 = CHECKBOX 40 { label { value = grün } } } 20 = CHECKBOX 20 { name = abc label { value = Abc } } 30 = SUBMIT 30 { name = 6 value = Submit form }
Updated by Björn Jacob about 9 years ago
Could you please test this form?
I did a small cleanup and added the value attribute itself. Your form had just label.value
defined (which is for the label). Please test this form. I have also enabled the confirmation page to test the form.
enctype = application/x-www-form-urlencoded method = post prefix = tx_form confirmation = 1 postProcessor { 1 = mail 1 { recipientEmail = your@mail.com senderEmail = your@mail.com subject = Checkbox value prüfen } } 10 = CHECKBOXGROUP 10 { class = fieldset-subgroup legend = Wählen Sie eine Farbe: name = farbwahl 10 = CHECKBOX 10 { label = gelb value = gelb } 20 = CHECKBOX 20 { label = blau value = blau } 30 = CHECKBOX 30 { label = rot value = rot } 40 = CHECKBOX 40 { label = grün value = grün } } 20 = CHECKBOX 20 { name = abc label = Abc value = Abc } 30 = SUBMIT 30 { name = submit value = Submit form }
Updated by Webtech AG about 9 years ago
With your code I get following Mail:
Wählen Sie eine Farbe: gelb gelb blau blau rot rot grün grün Abc Abc
As soon as I use the form wizard and do some changes and save it, then it breaks the code to an undefined code:
enctype = application/x-www-form-urlencoded method = post prefix = tx_form confirmation = postProcessor { 1 = mail 1 { recipientEmail = daniel.kempf@webtech.ch senderEmail = info@dasbad.ch subject = Checkbox value prüfen } } 10 = CHECKBOXGROUP 10 { class = fieldset-subgroup legend { value = Wählen Sie eine Farbe: } name = farbwahl 10 = CHECKBOX 10 { } 20 = CHECKBOX 20 { } 30 = CHECKBOX 30 { } 40 = CHECKBOX 40 { } } 20 = CHECKBOX 20 { name = abc value = Abc label { value = Abc } } 30 = SUBMIT 30 { name = submit value = Submit form }
Updated by Björn Jacob about 9 years ago
The form wizard should not be used after manually changing the form. The wizard in 6.2 does not support writing the value attribute of the CHECKBOX element. This is a separate issue and should not be handled here. It would be very nice of you creating a ticket for this problem. Thx!
So besides this issue the checkboxes are now transferred as expected but you are now having the problem with the layout of the email (I guess). Please check the massively updated documentation of EXT:form regarding .layout
: https://docs.typo3.org/typo3cms/extensions/form/0.3/Configuration/Layout/Index.html#change-the-layout-for-a-specific-view.
This documentation is a first draft and neither final nor merged yet. The documentation shows how to change the layout for a specific view. That way you could change the general layout of the CHECKBOX element within the email view. Try it out. I recommend not using the general .layout functionality. It is much better to address the 3 views separately.
... # customize postProcessor/ mail postProcessor { layout { checkbox ( <td><div class="textline"><inputvalue /></div></td> ) } } ...
Updated by Björn Jacob about 9 years ago
- Status changed from Needs Feedback to Closed
- Assignee deleted (
Webtech AG) - Target version deleted (
6.2.16)
I'm closing this issue since it is kind of resolved. I'm opening a new issue for the checkbox stuff.
Updated by Webtech AG about 9 years ago
Closing that issue is ok. It would be very kind if you will open a new issue for the checkbox-wizard issue.