FIX default values from DataObject not showing in GridField details form

This commit is contained in:
Hamish Friedlander 2012-11-16 11:48:31 +13:00
parent 0dd97a38f6
commit 7315be4531

View File

@ -325,9 +325,8 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
$actions,
$this->component->getValidator()
);
if($this->record->ID !== 0) {
$form->loadDataFrom($this->record);
}
$form->loadDataFrom($this->record, $this->record->ID == 0 ? Form::MERGE_IGNORE_FALSEISH : Form::MERGE_DEFAULT);
// TODO Coupling with CMS
$toplevelController = $this->getToplevelController();