Because the code to show those errors is in the form created by SQLFORM and that form is neither being returned nor displayed in the view.
On Mar 10, 4:00 pm, Pystar <aitoehi...@gmail.com> wrote: > tried this snippet of code from the web2py book, but it doesnt work > the way I feel it should > > def display_manual_form(): > form = SQLFORM(db.person) > if form.accepts(request.vars, formname='test'): > response.flash = 'form accepted' > elif form.errors: > response.flash = 'form has errors' > else: > response.flash = 'please fill the form' > return dict() > > {{extend 'layout.html'}} > <form> > <ul> > <li>Your name is <input name="name" /></li> > </ul> > <input type="submit" /> > <input type="hidden" name="_formname" value="test" /> > </form> > > On submission, if there are errors in the form, it doesnt display any > error messages. why is this so?