I have a multi-select repeater field with a list of resources.
The list is showing up as expected, but on the frontend side I get this:
194187183119920681190
what I would expect is something like this:
194,187,183,119,920,681,190
(the ids are correct).
I can neither find a system setting nor an options inside the multi-select cb modal.
core/components/contentblocks/elements/inputs/multiselectinput.class.php, line 20 only concatenates the output.
public function process(cbField $field, array $data = []): string
{
$tpl = $field->get(‘template’);
$output = '';
foreach ($data as $k => $datum) {
if ($k === 'value') {
foreach ($datum as $value) {
$output .= $this->contentBlocks->parse($tpl, ['value' => $value]);
}
}
}
return $output;
}
I don’t think this is how this function should work.
I guess it should be more like this:
public function process(cbField $field, array $data = []): string
{
$tpl = $field->get(‘template’);
$output = array();
foreach ($data as $k => $datum) {
if ($k === 'value') {
foreach ($datum as $value) {
$output[] = $this->contentBlocks->parse($tpl, ['value' => $value]);
}
}
}
$delimiter = ','; // should be a system setting
$output = implode($delimiter,$output);
return $output;
}
This solves my problem, but I’m afraid that this might break something.
What are your thoughts?