[Zope] Image Submit Buttons
Christopher J. Kucera
ckucera@globalcrossing.com
Thu, 13 Apr 2000 14:50:47 -0500
> 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.
This actually isn't a problem with Zope; it's how the Image type is
interpreted. The "value" tag has no meaning for Images. What you want is
this:
<input type=image src="add.gif" name="add">
<input type=image src="delete.gif" name="delete">
Then when you click on the add button, you'll get these two values in your
REQUEST space:
add.x
add.y
So, to check for which button you've pressed, you'll have to do:
<dtml-if "REQUEST.has_key('add.y')">
...
<dtml-elif "REQUEST.has_key('delete.x')">
...
</dtml-if>
That's just how forms work, nothing Zope specific. :)
Hope that helps,
CJ