Re: [web2py] Re: Reload page on component form submit

2014-05-09 Thread Carlos Cesar Caballero Díaz
Stewart, thanks for sharing such clear example!!! El 08/05/14 22:51, LaDarrius Stewart escribió: ---controller-- @auth.requires_login() def test(): a=request.args(0) form=SQLFORM(db.Notes).process() form.vars.TestID = a

[web2py] Re: Reload page on component form submit

2014-05-08 Thread Anthony
You should not set ajax_trap=False, as that will cause the form to be submitted to the action of the parent page rather than the action of the component. Instead, in your form processing code, if the form is accepted, you can do a redirect to the parent page URL, which will cause that URL to

Re: [web2py] Re: Reload page on component form submit

2014-05-08 Thread Carlos Cesar Caballero Díaz
Anthony, thanks for your answer. Of course, the form is submitted to the parent page... I think that I should rest a litle and continue tomorrow... Thanks again for your answer El 08/05/14 10:10, Anthony escribió: You should not set ajax_trap=False, as that will cause the form to be

Re: [web2py] Re: Reload page on component form submit

2014-05-08 Thread LaDarrius Stewart
---controller-- @auth.requires_login() def test(): a=request.args(0) form=SQLFORM(db.Notes).process() form.vars.TestID = a comments=db(db.Test.TestID==a).select() if form.process(formname=somename).accepted: form.vars.TestID = a