[Zope-dev] HTTPRequest change to allow images as submit methods
richard@bizarsoftware.com.au
richard@bizarsoftware.com.au
Thu, 18 Jan 2001 14:17:00 +1100
Zope's got this really cool form handling mechanism that allows us to have
mutiple submission buttons that call different methods. Way neat. Now, I'd
really like to have the same mechanism available when using images as
submission buttons (that is, <input type="image" name="goMethod:method">)
This breaks, of course, because goMethod:method gets turned into
goMethod:method.x and goMethod:method.y.
My proposal is to patch HTTPRequest.processInputs so that the search_type
RE is as follows:
':\([a-zA-Z][a-zA-Z0-9_]+\|\.[xy]\)$'
processInputs already loops through the name to find all :foo entries, and
the .x / .y results are just ignored by the
code. The HTML FORM source needs to be changed to include the extra ':'
required to make this work:
<input type="image" name="goMethod:method:">
^
It works fine for me in practice. I believe this will also benefit anyone
who wants other typed information from imagemap submissions (integer or
float values, for example).
Richard
--
Richard Jones
richard@bizarsoftware.com.au
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)