Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2019 at 11:07 UTC
Updated:
5 Jun 2020 at 13:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sammuell commentedComment #3
sammuell commentedWhen updating the required state in webform.js checkboxes are generally excluded in the respective selector (see attached patch file). If checkboxes are included in the selector it works as intended. However, I don't know if checkboxes have simply been forgotten or excluded on purpose.
Comment #4
liam morlandComment #5
liam morlandComment #6
sammuell commentedI'm wondering why the current implementation specifically lists some input types. Looking at the referenced issue I think it would make sense to simplify.
var $targetInputElements = $target.find("input,textarea,select");Comment #7
liam morlandThe problem only appears in cases were there is just one checkbox. Otherwise, @required is not set anyway.
Comment #9
liam morlandThanks for the patch.
Comment #11
jitendrapurohit commentedThis breaks the form when you have a conditional of making the checkbox group required on a radio click.
With this patch applied, the form isn't submitted unless we check ALL the checkboxes present in the group. I've attached a simple webform to replicate this usecase.
- Select radion button "Yes" to make the checkbox attribute required.
- Enable one of the checkbox and submit the form. It displays a validation error to enable all the checkboxes.
Comment #12
liam morland@#11: I think what you are reporting is already reported in #3100921: Multiple value select options requiring all boxes be checked.