When using MultiSelectField instances (or any field name that has the [] syntax - I also tested with TagField to confirm it was broken) the current implementation only pushes the final value into the URL rather than all instances of them.
Repo example if you want to test pre / post. You'll note on current 4 only 1 value of ListboxField is saved.
<?php
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\ListboxField;
use SilverStripe\Reports\Report;
class TestReport extends Report
{
public function title()
{
return 'Report';
}
public function parameterFields()
{
return FieldList::create([
ListboxField::create('PageID', 'Page', Page::get())
]);
}
public function sourceRecords($params = [], $sort = null, $limit = null)
{
$pages = Page::get();
if (isset($params['PageID'])) {
$pages = $pages->filter('ID', $params['PageID']);
}
return $pages;
}
}
Please target the 4.13 branch so that this can be released as a patch fix. We aren't releasing any new minor releases for the CMS 4 compatible branches.
When using
MultiSelectField
instances (or any field name that has the [] syntax - I also tested withTagField
to confirm it was broken) the current implementation only pushes the final value into the URL rather than all instances of them.Repo example if you want to test pre / post. You'll note on current
4
only 1 value of ListboxField is saved.