perhaps you can do it on application form level using onvalidation
e.g.
def __onvalidation_employee(form):
if form.vars.is_auth == 'on':
if form.vars.auth_user:
row = db(db.auth_user.id == form.vars.auth_user).select().first()

form.vars.first_name = row.first_name
form.vars.last_name = row.last_name
form.vars.email = row.email
 db(db.auth_user.id == form.vars.auth_user).update(status = T('Permanent') )
else:
form.errors.auth_user = T('Enter a value')
else:
if not form.vars.first_name:
form.errors.first_name = T('Enter a value')
elif not form.vars.last_name:
form.errors.last_name = T('Enter a value')

def employee():
grid = SQLFORM.grid(db.employee, onvalidation = __onvalidation_employee)
return locals()

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to