web/form.py
branchtls-sprint
changeset 1050 c9815bef16d7
parent 1049 f8e92c2f3bef
child 1053 e4d965b5ca37
--- a/web/form.py	Wed Mar 11 11:16:48 2009 +0100
+++ b/web/form.py	Wed Mar 11 11:17:45 2009 +0100
@@ -1075,7 +1075,7 @@
         tag = ('<form action="%s" method="post" id="%s" enctype="%s"' % (
             html_escape(form.action or '#'), form.domid, enctype))
         if form.onsubmit:
-            tag += ' onsubmit="%s"' % html_escape(form.onsubmit)
+            tag += ' onsubmit="%s"' % html_escape(form.onsubmit % form.__dict__)
         if form.cssstyle:
             tag += ' style="%s"' % html_escape(form.cssstyle)
         if form.cssclass: