Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2018 at 16:13 UTC
Updated:
12 Nov 2018 at 11:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jrockowitz commentedA single checkbox's #exclude_empty_checkbox option is handled via \Drupal\webform\Plugin\WebformElement\Checkbox::build.
Can you provide an example of the problem that we can use to fix the issue.
Comment #3
jrockowitz commentedComment #4
wturrell commentedTwo mistakes I made when reporting this:
Issue summary updated and test webform created (as you'll from the markup, I've determined where it breaks, but I got confused trying to debug it further).
Comment #5
jrockowitz commentedI am able to replicate this issue.
It seems like we have to refactor one or two things and then add a \Drupal\webform\Plugin\WebformElementInterface::isEmptyElementExclude(array $element) helper method.
Comment #6
jrockowitz commentedComment #7
wturrell commentedFixes typo that was passing wrong array to isEmptyExcluded()
Comment #8
wturrell commentedHere's a second webform that uses 'submission_exclude_empty_checkbox', rather than individual '#exclude_empty' keys.
I've tested the patch with both forms (also with checkboxes ticked) and it seems fine.
Comment #10
jrockowitz commented@wturrell Thanks for reviewing the patch.