Bug #4675
Multiple checkbox selection is not always submitted correctly
| Status: | Closed | Start date: | 2009-09-17 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Reinhard Führicht | % Done: | 100% |
|
| Category: | Code and Architecture | |||
| Target version: | Stable v1.0 | |||
| Votes: | 0 |
Description
How to reproduce:
- Formhandler 0.9.3
- Typo3 4.2.8
- Create a form using the multistep_example or multistep_conditions_example
- In the template setup, remove all error checks of the field interests (minItem, required)
- Fill in step 1 (check one or more interests), click "Next"
- In step 2, click "Previous"
- Uncheck all interests, click "Next" -> The interests you filled in the first time will be submitted
History
Updated by Reinhard Führicht over 3 years ago
- Assignee set to Reinhard Führicht
Hi,
there is a setting for that to be made in TypoScript:
plugin.Tx_Formhandler.settings.1 {
checkBoxFields = interests
# For radio buttons
radioButtonFields = field1,field2,field3
}
plugin.Tx_Formhandler.settings.2 {
checkBoxFields = another_field
# For radio buttons
radioButtonFields = field4,field5,field6
}
You have to enter the according field names for the step the fields are in.
This way Formhandler will know, that if there is no GET/POST parameter for one of these fields that the user didn't check anything and will overwrite the stored values in session.
I haven't used this for a long time now, but looking at the code it should work as expected.
Please give feedback.
Updated by Roman Iten over 3 years ago
I updated the TypoScript but the behavior is still the same: submitting a step the second time doesn't overwrite the stored values in the session.
The configuration for the first step looks now as follows:
##### STEP 1 CONFIGURATION #####
plugin.Tx_Formhandler.settings.predef.multistep_example.1 {
checkBoxFields = interests
validators {
1 {
class = Tx_Formhandler_Validator_Default
config {
fieldConf {
picture {
errorCheck.1 = fileAllowedTypes
errorCheck.1.allowedTypes = jpg,gif
errorCheck.2 = fileMinSize
errorCheck.2.minSize = 20000
errorCheck.3 = fileMaxSize
errorCheck.3.maxSize= 100000
errorCheck.4 = fileMaxCount
errorCheck.4.maxCount = 2
}
# [...]
# interests {
# errorCheck.1 = minItems
# errorCheck.1.value = 2
# errorCheck.2 = required
# }
contact_via {
errorCheck.1 = required
}
}
}
}
}
}
Updated by Reinhard Führicht over 3 years ago
- Target version set to Stable v1.0
Updated by Reinhard Führicht over 3 years ago
Should be fixed in r24857
Updated by Reinhard Führicht over 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Updated by Reinhard Führicht over 3 years ago
Work in progress. There should be a solution soon.