Re: [Zope-dev] disabling zope.schema constraint check in edit form
Joshua Immanuel <[email protected]>
| Newsgroups | gmane.comp.web.zope.bluebream,gmane.comp.web.zope.devel |
|---|---|
| Organization | HiPro IT Solutions Private Limited |
| Message-ID | <1313723307.3920.13.camel@jimman> |
Hello Leonardo, On Thu, 2011-08-18 at 19:10 +0200, Leonardo Rochael Almeida wrote: > For the 'cancel button' case, you need to have a form action with a > validator that always validates, no matter what. You can find an > example of one such null_validator here: > > https://svn.plone.org/svn/plone/plone.app.form/tags/2.0.3/plone/app/form/validators.py > > To use it, you do something like > > class MyForm(...): > > @form.action(..., validator=null_validator): > def handle_cancel(self, ...) > [... do the redirect ...] Thanks for the useful tip. I'll use this :) Regards Joshua -- Joshua Immanuel HiPro IT Solutions Private Limited http://hipro.co.in
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAk5N06UACgkQWw85XwuSFMKA2wCdGAOObdr+0UHxrh1cU1iTJrNT bKsAn2aqDpfJEYuYnwmAUJhphZh/x/N2 =jB2p -----END PGP SIGNATURE-----