On Mon, 2007-03-12 at 16:18 +0100, Thierry Florac wrote:
> I have several formlib.form.AddForm subclasses in which I've created a
> custom Action via "@action(...)".
> My problem is that I'd like to be able to launch some of these actions
> (but not all of them, it's "action specific") without executing
> automatic formlib controls (actually, for example, even a simple
> "Cancel" button which should just redirect the browser actually raises
> an exception when required fields are missing).
> Any help ?
> Thierry Florac
I implement cancel buttons for formlib like this (probably came from
somewhere but I forget where)::
def always_good(form, action, data):
"""Helper for actions - will always validate - useful for cancel
def handle_cancel(self, action, data):
Hope that helps, regards,
Zope3-users mailing list