From 077ce6c645b5e9984309b20cfdfed3b0b98fe32d Mon Sep 17 00:00:00 2001 From: Paul Meyrick Date: Fri, 8 Jun 2012 16:18:36 +1200 Subject: [PATCH] MINOR: Use setRows() and instead of constructor arguments --- code/model/formfields/EditableTextField.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/model/formfields/EditableTextField.php b/code/model/formfields/EditableTextField.php index 55fabb9..145b8e6 100755 --- a/code/model/formfields/EditableTextField.php +++ b/code/model/formfields/EditableTextField.php @@ -39,7 +39,9 @@ class EditableTextField extends EditableFormField { */ public function getFormField() { if($this->getSetting('Rows') && $this->getSetting('Rows') > 1) { - return new TextareaField($this->Name, $this->Title, $this->getSetting('Rows')); + $taf = new TextareaField($this->Name, $this->Title); + $taf->setRows($this->getSetting('Rows')); + return $taf; } else { return new TextField($this->Name, $this->Title, null, $this->getSetting('MaxLength'));