Ok than how would i put a register form in the default page (which is controlled by the default.py), If register box is generated by user -> register.py.
Thanks for the help, Kevin On Oct 11, 10:55 am, mdipierro <[EMAIL PROTECTED]> wrote: > This is not the way the go. Submitting forms to a different actions > other than the one generating the form is not a good software > engineering pattern. Forms should always self submit and redirect on > success. I suggest: > > form=SQLFORM(...) ## no _action=.... > if form.accepts(request.vars): > redirect(URL(r=request,c='user',f='register')) > > Anyway, your code should work. You are either not saving the session > or overriding the key (multiple forms per page). > To avoid the problem do not pass "session" to accepts(). > > Massimo > > On Oct 10, 9:59 pm, kev <[EMAIL PROTECTED]> wrote: > > > Ok so i have a little problem which i cant seem to solve. > > > In default.py controller i have a SQLFORM to display registration > > form. Now in the SQLFORM i have _action=URL(r=request, c='user', > > f='register') which transfer the form over to user/register. (i want > > to make controller for different things like user, gallery, etc). > > > Now the problem is the user/register does form=SQLFORM(...) and makes > > the form and tries to do form.accept with the request.vars sent from > > default. It doesn't seem to work at all and always fails the accepts > > test because i think formkey isn't getting passed or something. > > > Thanks. > > Kevin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---