So how do I design my forms manually and still have it display error messages and use validators?
On Mar 10, 10:25 pm, DenesL <[email protected]> wrote: > 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 <[email protected]> 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?

