Field('paypal_email', length=128, writable=False, compute=lambda r:
r.email))

On Mar 24, 1:38 am, pbreit <[email protected]> wrote:
> I can't seem to figure out a (good) way to have one of my auth_user fields
> default to another auth_user field. I only want the default to take place
> once so not "compute".
>
> I tried defaulting to a lambda but that doesn't work.
>
> db.define_table('auth_user',
>     ...
>     Field('email', length=128, required=True, unique=True),
>     Field('paypal_email', length=128, default=lambda r: r.email))
>
> With any other forms I could probably set the form.vars or do an
> onvalidation but I'm not sure how or if I can do that with auth() forms.

Reply via email to