Torsten Irländer committed 0691ad7

Changed which values are taken on form rendering.

  • Participants
  • Parent commits 412fc90

Comments (0)

Files changed (1)

File formbar/

         self.current_page = page
         renderer = FormRenderer(self, self._translate)
         form = renderer.render(values)
-        return htmlfill.render(form, values or self.serialize(
+        # If the form is validated (POST) and the form contains no erros
+        # than we use the serialized values of which includes
+        # the converted values.
+        # In all other cases return the attribute which either
+        # has the serialized data of the loaded item (GET) or the
+        # submitted error data on POST.
+        if self.validated and not self.has_errors():
+            return htmlfill.render(form, values or self.serialize(
+        return htmlfill.render(form, values or
     def _add_error(self, fieldname, error):
         field = self.get_field(fieldname)