One possibility is to add the extra fields to the auth_user table and then turn them "off" for user registration. I do this for my swimming web site and it works great. In the controller just declare any fields you wish to hide as "db.x.readable=False" and "db.x.writable=False" (where x is your field name). Fields which are not readable or writable are not rendered to the display, so the users would not see those fields. Set the field readable and writeable to "True" when you want the employee to register.
On Sunday, June 1, 2014 10:30:25 AM UTC-7, Shubham Sinha wrote: > > So I want to create two registration forms side by side. One for users and > other for employees. So basically the index page will have something like > "Click here if you are a user" and "Click here if you are an employee". It > will redirect to the appropriate registration page. I want the user > registration to be just like how the built in web2py registration is. For > the employee registration I want the following fields: > > 1. Name 2. Store Name 3. Store Type 4. Zip Code > > I am really new to web2py so not sure how to implement this. Could someone > please tell me how I should go about creating a registration.py model for > this? Also I want the index to redirect to these two links as appropriate: > > [app]/user/register[app]/employee/register > > Also what would my controller file look like? Would I need a separate > controller for user and the employee? > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

