Hello Martin, quoted from http://www.plope.com/Books/2_7Edition/ScriptingZope.stx "action Appends the attribute value to the original form action of the form. This is mostly useful for the case in which you have multiple submit buttons on one form. Each button can be assigned to a script that gets called when that button is clicked to submit the form. A synonym for action is method." so basically, I interpretted it like: 'foo:action' == 'foo:method', but it's unclear. Thanks for your precision. Manuel 2007/2/8, Martijn Pieters <mj@zopatista.com>:
On 2/7/07, Andreas Jung <lists@zopyx.com> 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 pressed.
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.
HTH,
-- Martijn Pieters