This should work fine:

form = SQLFORM.factory(Field('visitor_name', requires=IS_NOT_EMPTY(), 
label=T('what is your name?')))

On Sunday, 7 September 2014 04:49:08 UTC-5, terencenwk wrote:
>
> Regarding to Postbacks in Documentation:
> http://web2py.com/books/default/chapter/29/03/overview#Postbacks
>
> (1) What is the final answer of default/second.html if the the default 
> controller finally changed to:
>
> def first():
>     form = SQLFORM.factory(Field('visitor_name', requires=IS_NOT_EMPTY()))
>     if form.process().accepted:
>         name = form.vars.visitor_name
>         redirect(URL('second',vars=dict(name=name)))
>     return dict(form=form)
>
> def second():
>     name = request.vars.name or redirect(URL('first'))
>     return dict(name=name)
>
> (2) How to use T Operator in above example?  Because there is an error if 
> I add:
> label='what is your name?'
> in above example.
>
>

-- 
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.

Reply via email to