web/formrenderers.py
branchtls-sprint
changeset 1274 b730932a79b7
parent 1181 620ec8e6ae19
child 1291 22b4d300d18d
--- a/web/formrenderers.py	Tue Apr 07 19:53:24 2009 +0200
+++ b/web/formrenderers.py	Tue Apr 07 19:53:49 2009 +0200
@@ -108,8 +108,10 @@
             action = form.req.build_url('edit')
         else:
             action = form.action
-        tag = ('<form action="%s" method="post" id="%s" enctype="%s"' % (
-            html_escape(action or '#'), form.domid, enctype))
+        tag = ('<form action="%s" method="post" enctype="%s"' % (
+            html_escape(action or '#'), enctype))
+        if form.domid:
+            tag += ' id="%s"' % form.domid
         if form.onsubmit:
             tag += ' onsubmit="%s"' % html_escape(form.onsubmit % dictattr(form))
         if form.cssstyle: