Browse files

BUG Form session message clearing regression

Regression originally from 729bcc9, but made visible by 014f541
  • Loading branch information...
1 parent 3d921e7 commit 5d37d55f3558424a9b284ead05acae6f73c3c03f @chillu chillu committed Jan 21, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 forms/Form.php
View
12 forms/Form.php
@@ -1319,15 +1319,15 @@ public function callfieldmethod($data) {
* than <% control FormObject %>
*/
public function forTemplate() {
- // Now that we're rendered, clear message
- Session::clear("FormInfo.{$this->FormName()}.errors");
- Session::clear("FormInfo.{$this->FormName()}.formError");
- Session::clear("FormInfo.{$this->FormName()}.data");
-
- return $this->renderWith(array_merge(
+ $return = $this->renderWith(array_merge(
(array)$this->getTemplate(),
array('Form')
));
+
+ // Now that we're rendered, clear message
+ $this->clearMessage();
+
+ return $return;
}
/**

0 comments on commit 5d37d55

Please sign in to comment.