[Zope] Re: Re: [Zope] detail record editing

a.wacknitz@francotyp.com a.wacknitz@francotyp.com
Wed, 7 Jun 2000 12:01:49 +0200


> On Mon, 5 Jun 2000, Robert Del Huerto wrote:
> 
> > database.  I'm stuck after that.  The form only has one 'action' so how
> > would I get it to handle the right function depending on the button that
> > was pushed?  I'm no HTML expert but I've looked around quite a bit for
> 
> It can be done with some badly documented magic (see 
> http://www.zope.org/Members/Zen/howto/FormVariableTypes when zope.org
> is working again :-P)
> 
> Example:
> 
> <form action='itdoesntmatter' method=post>
> <input name=afield>
> <input type=submit name="delete:method" value=" Delete ">
> <input type=submit name="modify:method" value=" Modify ">
> </form>
Wow, live can be so easy ;-)
But I wonder if I can pass additional parameters to the methods.
No, <input type=hidden name=... value=...> does not fit my needs as the
parameter to pass has always the same name but different values for each
method.

> 
> In this example, the action is never called. If the user clicks on
> the delete button, the method 'delete' (generally in the same folder as
this
This is not necessary as I have found out. You can give full qualified paths
to the methods eg. <input type=submit name="/myMethods/delete:method value
=" Delete ">.

> form) is called instead of the action. Similarly, click on Modify and the 
> method called 'modify' is called instead of the action.
> 
> I'll try to remember to put this up as a tip on zope.org when its
possible...
> 
> -- 
> Stuart Bishop                          Work: zen@c...
> Senior Systems Alchemist               Play: zen@s...
> Computer Science, RMIT University

TIA,
Andreas
**********************************************************************
This email message has been swept by MIMEsweeper for the presence of
computer viruses.

Francotyp-Postalia AG & Co.