From 76483188dc781394ed4b602a4192c21f121d104e Mon Sep 17 00:00:00 2001 From: Nic Horstmeier Date: Tue, 20 Sep 2016 19:26:47 -0500 Subject: [PATCH] BUGFIX EditableFormHeading doesn't properly handle numeric values fixes #510 --- code/model/editableformfields/EditableFormHeading.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);