mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #319 from ntd/inline-row-with-defaults
FIX: use default values in new inline rows (#64)
This commit is contained in:
commit
7738a0b89b
@ -135,6 +135,9 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
|||||||
$field->getName()
|
$field->getName()
|
||||||
));
|
));
|
||||||
|
|
||||||
|
if ($record && $record->hasField($column)) {
|
||||||
|
$field->setValue($record->getField($column));
|
||||||
|
}
|
||||||
$content = $field->Field();
|
$content = $field->Field();
|
||||||
} else {
|
} else {
|
||||||
$content = $grid->getColumnContent($record, $column);
|
$content = $grid->getColumnContent($record, $column);
|
||||||
|
Loading…
Reference in New Issue
Block a user