[web2py] Re: Problem with form.process().accepted ?

2013-04-05 Thread Anthony
> > redirect('default', 'list') Should be: redirect(URL('default', 'list')) When I submit form with empty value (person name), validation does not work. > What do you mean it doesn't work? Do you not see the error message on the form? What do you expect, and what happens instead? It

[web2py] Re: Problem with form.process().accepted ?

2013-04-07 Thread Nguyen Minh Tuan
Thanks Anthony, When I submit with blank data, no error msg displayed. I expected error msg displayed because I set this field mandatory as below db.define_table('person', Field('personname', 'string', requires = IS_NOT_EMPTY())) I found that : if form.process().accepted: always return false

[web2py] Re: Problem with form.process().accepted ?

2013-04-07 Thread Anthony
Is it possible that your browser isn't accepting cookies, or that you are somehow clearing the session? Without cookies, the session won't work, and by default, SQLFORM uses the session to store the _formkey token to protect against CSRF attacks. To see if that's the problem, you can try: if fo

[web2py] Re: Problem with form.process().accepted ?

2013-04-08 Thread Nguyen Minh Tuan
Thank you! That's the problem. On Monday, April 8, 2013 1:06:29 PM UTC+7, Anthony wrote: > > Is it possible that your browser isn't accepting cookies, or that you are > somehow clearing the session? Without cookies, the session won't work, and > by default, SQLFORM uses the session to store the