Oh, shoot, I figured that might be the answer but only had
"register_onaccept" in my list.
I ended up writing a function since it seems assignments in lambdas are
difficult. I tried setattr() and a nested function to no avail. Any ideas?
def set_paypal_email(form):
form.vars.paypal_email=fo
auth.settings.register_onvalidation=lambda form:
manipulate_form_before_insert(form)
On Mar 24, 2011, at 6:06 PM, pbreit wrote:
> OK, I see. Is there some way to intercept the user/register form.accepts to
> set that default?
OK, I see. Is there some way to intercept the user/register form.accepts to
set that default?
default does a take a lambda but one without arguments, because the info is
used before the form is submitted so there is no data (r).
On Mar 24, 2011, at 5:30 PM, pbreit wrote:
> I don't think that's quite the behavior I'm looking for. I want it to 1)
> default.paypal_email=email upon regist
I don't think that's quite the behavior I'm looking for. I want it to 1)
default.paypal_email=email upon registration and 2) both email and
paypal_email editable independently in Edit Profile.
So this would be perfect:
Field('paypal_email', length=128, default=lambda r: r.email))
But
Field('paypal_email', length=128, writable=False, compute=lambda r:
r.email))
On Mar 24, 1:38 am, pbreit 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 t
6 matches
Mail list logo