diff --git a/code/model/editableformfields/EditableFormField.php b/code/model/editableformfields/EditableFormField.php index 40c6095..9bf7d9b 100755 --- a/code/model/editableformfields/EditableFormField.php +++ b/code/model/editableformfields/EditableFormField.php @@ -81,6 +81,11 @@ class EditableFormField extends DataObject { "RightTitle" => "Varchar(255)", // from CustomSettings "ShowOnLoad" => "Boolean(1)", // from CustomSettings ); + + private static $defaults = array( + 'ShowOnLoad' => true, + ); + /** * @config diff --git a/code/model/editableformfields/EditableFormHeading.php b/code/model/editableformfields/EditableFormHeading.php index 03a1176..f85d18d 100755 --- a/code/model/editableformfields/EditableFormHeading.php +++ b/code/model/editableformfields/EditableFormHeading.php @@ -56,7 +56,8 @@ class EditableFormHeading extends EditableFormField { } public function getFormField() { - $labelField = new HeaderField($this->Name, $this->EscapedTitle, $this->Level); + $labelField = HeaderField::create($this->EscapedTitle) + ->setHeadingLevel($this->Level); $labelField->addExtraClass('FormHeading'); $labelField->setAttribute('data-id', $this->Name); $this->doUpdateFormField($labelField);