You can set the readable and writable attributes of fields wherever you want -- so set them conditionally based on the particular registration form being served. You might even write a helper function that takes a list of fields and sets their readable and writable attributes to True or False -- then just pass the relevant fields to that helper function as needed.
Anthony On Friday, June 7, 2013 8:21:23 PM UTC-4, lesssugar wrote: > > What if (as you probably already know) I have two registration forms. In > one case I need fields A, B, C, D, in the other case - C, D, E. Do I set > this in the model also? > > On Saturday, June 8, 2013 2:01:28 AM UTC+2, Anthony wrote: >> >> Just set the "readable" and "writable" attributes of the fields you don't >> want to show to False. >> >> Anthony >> >> On Friday, June 7, 2013 7:40:07 PM UTC-4, lesssugar wrote: >>> >>> auth_user stores many fields. For registration, I would like to use only >>> some of them. Is there a simple way to specify fields for registration form >>> - except form.custom? >>> >>> It would be great to just set the form >>> >>> register_form = auth.register() >>> >>> and then list the fields of auth_user to be used, like >>> >>> register_form =[Field(A), Field(B), ...] >>> >>> -- --- 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/groups/opt_out.