silverstripe-userforms: Checkbox validation error is appearing
Note that… getSourceAsArray() function is missed in version 4.2.2. Can you please merge the following code? or not sure is this feature?
/**
* @inheritdoc
*
* @return array
*/
public function getSourceAsArray()
{
$array = parent::getSourceAsArray();
return array_values($array);
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (18 by maintainers)
I’m getting this issue as well with SS framework 3.3.4 and Userforms 4.4.x-dev.
Issue is where the sourceArray comes back as a numeric array and not an associative, so framework’s array_intersect_key in CheckboxSetField is incompatible.
Can you open a PR?