I confirmed that the code provided does not work for multi-valued fields. In addition, the code didn't meet coding standards. Here's a modified version (which still doesn't solve the issue for multi-valued fields):
// List format is a comma-separated list. if ($this->options['webform_element_format'] == 'list') { $result = []; $options['delta'] = 0; while ($formatted_item = $this->webformElementManager->invokeMethod('formatHtml',$composite_element, $webform_submission, $options)) { $result[] = $formatted_item['#plain_text']; $options['delta'] += 1; } return ['#markup' => implode(', ', $result)]; }
- Status changed to Needs work
about 2 years ago 8:33pm 27 January 2023