Hi All,

I am trying to find a way to raise an error in the 'createAndAdd' method
after checking for duplicate names in the container and return the user
to the form for correction if the name is a duplicate.

I've tried this in the createAndAdd method::

        if True:
            error_msg = _("Duplicate username: ${username}", \
                        mapping={'username':username})
            self.errors = (error_msg,)
            result = self.actions['form.actions.add'].failure(data,
self.errors)
            self.form_result = result
            return

This gets me back to the form, but all fields have been reset. All else
that I have tried has come to nought.

Any suggestions?

Darryl


_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to