mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 15:05:39 +00:00
Allow dataless fields in inline add button
This commit is contained in:
parent
7bf3cf9a31
commit
3fc48b33ee
@ -93,8 +93,7 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
||||
$fields = $editable->getFields($grid, $record);
|
||||
|
||||
foreach($grid->getColumns() as $column) {
|
||||
if(in_array($column, $handled)) {
|
||||
$field = $fields->dataFieldByName($column);
|
||||
if(in_array($column, $handled) && $field = $fields->fieldByName($column)) {
|
||||
$field->setName(sprintf(
|
||||
'%s[%s][{%%=o.num%%}][%s]', $grid->getName(), __CLASS__, $field->getName()
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user