Anthony- you're right on both counts- sloppy copy and pasting on my part- edited my previous post, everything works. Thanks!-
On Tuesday, August 7, 2012 2:47:57 PM UTC-4, Anthony wrote: > > OK- figured this out, mostly. Anthony's answer worked, but only after I >> added session to the .accepts(...) args // and or used >> form.process(...).accepted instead. >> > > Yes, the formkey is stored in the session, so you have to pass the session > to form.accepts() for the formkey to be created. form.process() ultimately > calls form.accepts(), and it automatically passes the session (unless you > explicitly set session=None). > > >> Note however that using *{{=form.hidden_fields()}}* in the view does NOT >> work for me (the form never gets accepted) even though the generated HTML >> looks fine. I don't have an explanation for this- >> > > I tried your exact code, and {{=form.hidden_fields()}} seems to work fine > for me. > > Side note: In your code, you are processing the form twice -- once with > form.accepts(), and a second time with form.process() in the returned dict. > > Anthony > --