diff --git a/admin/code/CMSForm.php b/admin/code/CMSForm.php index 467e1e477..2cc33807e 100644 --- a/admin/code/CMSForm.php +++ b/admin/code/CMSForm.php @@ -37,4 +37,9 @@ class CMSForm extends Form { return $this->responseNegotiator; } + public function FormName() { + if($this->htmlID) return $this->htmlID; + else return 'Form_' . str_replace(array('.', '/'), '', $this->name); + } + } \ No newline at end of file diff --git a/forms/Form.php b/forms/Form.php index 4dd0f84f2..ae223abb3 100644 --- a/forms/Form.php +++ b/forms/Form.php @@ -241,6 +241,8 @@ class Form extends RequestHandler { if(isset($errorInfo['message']) && isset($errorInfo['type'])) { $this->setMessage($errorInfo['message'], $errorInfo['type']); } + + return $this; } /**