diff --git a/forms/FormScaffolder.php b/forms/FormScaffolder.php index c0d77f40e..1b65034d7 100644 --- a/forms/FormScaffolder.php +++ b/forms/FormScaffolder.php @@ -89,10 +89,11 @@ class FormScaffolder extends Object { } // add has_one relation fields - if($this->obj->has_one() && ($this->includeRelations === true || isset($this->includeRelations['has_one']))) { + if($this->obj->has_one()) { foreach($this->obj->has_one() as $relationship => $component) { if($this->restrictFields && !in_array($relationship, $this->restrictFields)) continue; $hasOneField = $this->obj->dbObject("{$relationship}ID")->scaffoldFormField(null, $this->getParamsArray()); + $hasOneField->setTitle($this->obj->fieldLabel($relationship)); if($this->tabbed) { $fields->addFieldToTab("Root.Main", $hasOneField); } else {