Ok I think I got it... I needed to check if it was accepted before it would take it... so I added after the form = bla bla if form.accepts(request.vars, session): response.flash="New order added" And it works perfectly. Thanks for the help!! BR, Jason Brower
On Fri, 2010-01-29 at 01:00 -0800, pistacchio wrote: > hi jason, > by writing > > orders = SQLFORM(db.numbers) > > you are assigning to the variable "orders" the form. in the following > line you return form=form, but the latter is a null object. > > so, either you change the name of the variable like this: > form = SQLFORM(db.numbers) > return dict(form=form) > {{=form}} > > or you pass order: > > order = SQLFORM(db.numbers) > return dict(form=order) > {{=form}} > > or > > order = SQLFORM(db.numbers) > return dict(order=order) > {{=order}} > > hope this helps understanding the logic behind it. > > On Jan 29, 9:00 am, Jason Brower <encomp...@gmail.com> wrote: > > I have this in the end of my controller... > > orders = SQLFORM(db.numbers) > > return dict(form=form) > > > > And I simply print it with the view... > > {{=form}} > > > > In that view I use ajax pulls that look for new content in orders and > > print it on that same page. (I need it so that other people on other > > browsers can add content and it's seen in idle viewers canvas's.) The > > form is unaffected by the ajax pull as far as I know. > > The form never seems to accept anything. Nor do I get any errors. I > > can go into the database admin and add items and they add just fine even > > with the same content. > > Any ideas what I could be doing wrong? > > BR, > > Jason > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.