[web2py] Re: How to exclude some fields from a form for a database record?

2013-03-22 Thread Alan Etkin
A good one. And for you initial requirement which was taking a particular field out of the form (not choosing the whole set of fields that the registration form should show), this is more compact, specially if you are populating the scaffolding auth_user table with custom fields: auth.settings.

[web2py] Re: How to exclude some fields from a form for a database record?

2013-03-22 Thread David Ripplinger
I found a cleaner solution after some digging. In db.py, after creating the auth object, include the line: auth.settings.register_fields = ['id', 'first_name', 'last_name', 'email', 'password'] or if when you created the auth object you passed in username=True, include the line: auth.settings

[web2py] Re: How to exclude some fields from a form for a database record?

2013-03-22 Thread Alan Etkin
> Do I just need to write a custom form and a custom handler for the post, or is there an easy way to do this? You could set the the readable and writable attributes to False only if the scaffolding registration action is called: if request.function == "user" and "register" in request.args: