On Jul 29, 5:51 pm, Carl <carl.ro...@gmail.com> wrote:
> I'm using auth for my authentication.
> I have two types of users: buyers and students.
> Each user type fills in a different (overlapping) set of fields when
> they register.
> One user type may, at a future point, register as an additional type.
> Can I use web2py auth to offer differnt registration fields?
> say for .../user_b/register & .../user_s/register
> I've looked into tools.py at register() and, given that it calls
> SQLForm() without giving a "fields=" parameter I'm jumping ahead and
> thinking that getting my desired behaviour won't be easy.

It is certainly possible to have 2 different register pages which use
different view templates.
I would add all fields to the auth_user table & then use jQuery
to .hide() rows that are not required for that user type.
You may also want to change the table.field.requires settings within
the different controllers (or else set acceptable dummy values via
table.field.default or even using jQuery)

F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to