- Issue created by @thomasdegraaff
Please add to the issue summary your code implementation that triggers this bug.
- π³π±Netherlands thomasdegraaff
Update: The issue is not resolved by adding
if (!isset($element['#default_value']) || $element['#default_value'] == 0) { $element['#default_value'] = []; }
Because then the checkboxes are not show in the webform when you accept the defaults without changing anything. They do appear though when you manually change a default option. Then all default options are shown.
- πΊπΈUnited States jrockowitz Brooklyn, NY
We can't debug custom code, but conceptually, I understand the checkboxes default value should be an array and not an empty string.
The attached patch might fix your issue, you could change #default_value when you extend the WebformCheckboxes plugin.