I have a couple of questions about the provided Auth.register() function (I 
suppose they also apply to other Auth functions in general):

1. In a controller, if I do:

def register():
    return dict(form=auth.register())

with the following settings in a model:

auth.settings.registration_requires_verification = True
auth.settings.register_next = URL (...)

Everything works as expected, i.e. the verification email is sent after the 
registration form is processed, and the user gets re-directed to a 
different page. However, as soon as I do sth like:

def register():
    form = auth.register()
    # then do sth with the form
    return dict(form=form)

Both verification email and re-direction stop working even though the form 
processed successfully. I wonder what causes this breakdown? I am using the 
trunk version of web2py.


2. How much customization can we do with the form returned by 
auth.register()? I know we can add add fields to it (a few different ways), 
but can we modify its class? For example, I am able to do sth like:

form.element(_type='submit')['_class'] = '...'

to change the class of its elements. How do we change the class for the 
whole form? How do we position each field? How do we position the whole 
form on the page? etc.

Thanks in advance! 



Reply via email to