[Zope] Image Submit Buttons

Weston Bustraan weston@itdonline.net
Thu, 13 Apr 2000 15:33:46 -0400 (EDT)


I have a form where, instead of "Add" and "Delete" buttons, I want to use
images of a plus and a minus sign. If I use images, Zope seems to ignore
the names and values of buttons. 

For example:

I have something that looks like this:

Form Html:
<form action="edit" method="post">
<input type="submit" name="mode" value="Add">
<input type="submit" name="mode" value="Delet">
</form>

DTML Method "edit":
<dtml-if "mode == 'Add'">
....
<dtml-elseif "mode == 'Delete'">
....
</dtml-if>

Works great, but if I change the form to:

<form action="edit" method="post">
<input type="image" src="..." name="mode" value="Add">
<input type="image" src="..." name="mode" value="Delet">
</form>

Zope responds:
"Zope Error
Zope has encountered an error while publishing this resource. 
Error Type: NameError
Error Value: mode"

Anybody have any suggestions?

,------------------------------------------------------------,
| Weston J. Bustraan      | E-Mail: weston@itdonline.net     |
| Development Manager     | Phone: (616)249-3630             |   
| Infinity Tel-Data Inc.  | Fax:   (616)249-3067             |
| 4723 S. Division Ave.   | WWW: www.itdonline.net           |
| Wyoming, MI 49548       | PGP: finger weston@itdonline.net |
`------------------------------------------------------------`

A)bort, R)etry, I)nfluence with large hammer.