<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
Hey folks,<BR>
<BR>
Could we get names on the forms? I'm trying to fiddle with the matrix using WWW::Mechanize and I'm having to select the form I want to submit by index. If another form is added prior to this one, the code will break. If there were name attributes on the forms, this would keep such problems from happening...<BR>
<BR>
Here, let me put a patch together...<BR>
<BR>
<BLOCKQUOTE>
<PRE>
$ svn diff
Index: customize/deffile.py
===================================================================
--- customize/deffile.py        (revision 9613)
+++ customize/deffile.py        (working copy)
@@ -203,7 +203,7 @@
HTML_postform = '</form>'
HTML_uploadpreform = '''
-<form action="matrix.cgi" method="post" enctype="multipart/form-data">
+<form action="matrix.cgi" method="post" enctype="multipart/form-data" name="choices_form">
'''
HTML_uploadpostform = '</form>'
</PRE>
</BLOCKQUOTE>
<BR>
<BR>
Hurm... you might want to re-think using HTML_preform as it is currently. It will be difficult to modify the opening form tag this way. I would recommend using <A HREF="http://math.arizona.edu/~kerl/python/sprintf.html">printf-style string interpolation</A>.<BR>
<BR>
In fact, a templating system like <A HREF="http://www.makotemplates.org/">mako</A> or <A HREF="http://docs.djangoproject.com/en/dev/ref/templates/api/">django</A> would probably be a better fit, but will require quite a bit of re-factoring.<BR>
<BR>
Cheers,<BR>
<BR>
C.J.<BR>
<BR>
</BODY>
</HTML>