[Zope] Detecting which form button is pushed?

Brett Morgan brett@pulse.itd.uts.edu.au
Mon, 21 Feb 2000 00:33:13 +1100


I am currently playing with a form with multiple submit buttons and I
was wondering the correct dtml way of detecting which submit button
was pushed: My Submit buttons look like:

...
<input type="SUBMIT" name="create" value="Create As New Record (Copy)">
<input type="SUBMIT" name="edit" value="Edit In Place">
<input type="SUBMIT" name="delete" value="Delete This Record">
...

And I would like to know what is the correct way of munging
REQUEST.form to switch on which was pressed. 

Also is there a way of <dtml-if>'ing on the existance of a variable in
the namespace? I sometimes want the logical control similar to the
&dtml.missing-variable; entity def.

brett

-- 
email: Brett.Morgan@uts.edu.au
phone: +61-2-9514-2091

A guy goes into a doctor's office.  The doctor tells him,
"You're fat!"  The guy says, "Doctor, I want a second
opinion!"  The doctor says, "OK, you're ugly, too!"