diff --git a/code/GridFieldAddNewInlineButton.php b/code/GridFieldAddNewInlineButton.php index 9bd52095..f168f17e 100755 --- a/code/GridFieldAddNewInlineButton.php +++ b/code/GridFieldAddNewInlineButton.php @@ -137,7 +137,7 @@ public function handleSave(GridField $grid, DataObjectInterface $record) { } foreach($value[__CLASS__] as $fields) { - $item = new $class(); + $item = $class::create(); $extra = array(); if($list instanceof ManyManyList) {