Why not use the process() method's "next" parameter? http://web2py.com/books/default/chapter/29/07?search=.accepted#The-process-and-validate-methods
Otherwise, there's "redirect()" - http://web2py.com/books/default/chapter/29/07?search=redirect%28#Forms-and-redirection On Thursday, January 31, 2013 4:18:37 AM UTC-5, Loïc wrote: > > Hello All, > > I have a question about my application organized as follows: > *A "main" page : render_page > *A component "load_newsletter". This component displays a form with an > "email" field and a "submit button" > > What I want to do : > When the user fill the form in my component load_newsletter, I want to > redirect the "main" page to an other page (full_newsletter) > This other page contains a more complete form to add some information > > I don't know if I can redirect the page which contains a component, from > inside this component? > > Example of code: > > ###### View "render_page.html" ###### > {{extend 'layout.html'}} > {{block right_sidebar}} > {{=LOAD('default','load_newsletter.html',ajax=True)}} > {{end}} > ################################### > > ###### Controller "load_newsletter" ###### > form=FORM(DIV(T('Your email'), _class='blueText'), > INPUT(_name='email', _type='email', > requires=IS_NOT_EMPTY()), > INPUT(_type='submit')) > if form.process().accepted: > # >>>>> Here I want to redirect the page which contains me to > "full_newsletter" <<<<< > elif form.errors: > response.flash = T('There was an error in the form') > return dict(form=form) > ####################################### > > Thank you for your help > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.