Permalink
Browse files

FIX default values from DataObject not showing in GridField details form

  • Loading branch information...
Hamish Friedlander
Hamish Friedlander committed Nov 15, 2012
1 parent 0dd97a3 commit 7315be4531975998f683e41b48781d3ed7d9c74f
Showing with 2 additions and 3 deletions.
  1. +2 −3 forms/gridfield/GridFieldDetailForm.php
@@ -325,9 +325,8 @@ public function ItemEditForm() {
$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();

0 comments on commit 7315be4

Please sign in to comment.