Massimo,

I tried this but did not work:

def sync_profile_and_t2(form):
    if form.vars.email!=form.record.email:
        db(db.t2_person.id==form.vars.student_id).update(email=form.vars.email)

I have a student database with the email field and it gets updated but
the t2_person.email does not.

What is missing?

thx,

-wj

On Mon, Dec 1, 2008 at 12:09 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> you can do
>
> def myaccept(form):
>     if form.vars.email!=form.record.email:
>        ... do soemthing, perhaps: db
> (db.t2_person.id==form.vars.person_id).update(....)
>
> t2.update(...,onaccept=myaccept)
>
> Massimo
>
> On Dec 1, 12:56 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
>> I set the a student email to the t2.person email address when they
>> submit a form.  Is there an easy way to update the t2.person email
>> address if the student changes the email address in their data form?
>>
>> Actually, maybe I could put the t2.person field in that spot on the
>> student form instead of having an email address in t2.person and
>> student tables.
>>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to