On 2/7/07, Andreas Jung <[EMAIL PROTECTED]> wrote:

Andreas, that doesn't speak a word about the form-field modifier 'method'.

> I am looking for some documentation about the ":method" used in some
> forms, for instance  name="discussion_reply:method", but can't find
> anything.

If the request finds a form field ending in :method in the request,
the id before it is appended to the request URL. This way you can have
multiple callables (scripts, objects, methods, whatever) process the
information from one form, depending on what submit button was

It works as follows:

1/ create a form that POSTS to server/path/
2/ use submit buttons named like 'foo:method' and 'bar:method'
3/ Create 'foo' and 'bar' in /path/ (or have them available there
through acquisition or skins)

Now, when a user clicks the 'foo:method' button, Zope receives a form
for server/path/, and modifies the request to go to server/path/foo
instead. If 'bar:method' was pressed, the request ends  up at
server/path/bar instead.


Martijn Pieters
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to