[Zope] Delete from edit form

Kevin Dangoor kid@kendermedia.com
Mon, 11 Oct 1999 15:17:37 -0400


-----Original Message-----
From: Joshua Brauer <joshua@brauer.org>
To: zope@zope.org <zope@zope.org>
Date: Monday, October 11, 1999 3:17 PM
Subject: [Zope] Delete from edit form


>which doesn't work because the item is not found.... understandable as
we're at item/edit in the case of this form, so I changed it to:
>
><FORM action=manage_delObjects method=post>
><INPUT TYPE=hidden name="ids:list" value="../<dtml-var id>">
><input type=submit value="Delete Item"> </FORM>
>
>no go here either... My Qeustion is:
>
>Is it possible to have a form (in a Zclass instance) that deletes the
instance of the Zclass and if so, how!

I think it is possible. manage_delObjects is a method of the container. So,
what you need is something like:

<form action=deleteMe method=post>
<input type=submit value="Delete Me">
</form>

deleteMe:

<dtml-call "PARENTS[1].manage_delObjects([id])">


Kevin