OK, I forgot the underscore before 'action' (I also forgot to include request.args in the form action URL) -- I think this should do it: form.update(_class='no_trap', _action=URL('default','create_fvte.html',args=request.args)) Note, adding the .html extension to create_fvte above ensures that when the form is submitted back to this function, the extension will be .html, which is the extension that will be passed to the redirects. Also, you should remove the following from create_fvte: else: response.flash = T('please fill out the form') The problem with that is that when you redirect to the /creation URL, it reloads your components, and the response.flash from the components overrides the session.flash that was passed to the /creation page. Instead, put the following in the creation() function: if not request.args: response.flash = T('please fill out the form') That will flash 'please fill out the form' when the /creation page is loaded without any arguments, but not otherwise. With those small changes, I believe it all works as you want now. Anthony
On Wednesday, June 29, 2011 9:57:09 PM UTC-4, Richard wrote: > It clear validator if they trigger and don't know why the redirection don't > works neither... > > Maybe pbreit is right and I should just forget about redirection... It's > probably what I will do for now, cause I can't spend any longer on this > picky stuff for now. It's part of the 20% percent stuff... > > Thanks anyway, I really appreciate your help. > > ;-) > > Richard > > On Wed, Jun 29, 2011 at 6:54 PM, Anthony <abas...@gmail.com> wrote: > >> Sorry, the **dict() isn't really needed -- you can just do: >> >> form.element('form').update(**_class='no_trap', >> action=URL('default','create_**fvte')) >> >> >> Actually, in the URL() call above, you might be better off doing >> 'create_fvte.html' to ensure it doesn't use the .load extension, which would >> then propagate to the redirect (unless you explicitly specify .hmtl in the >> redirect). >> >> Anthony >> >> On Wednesday, June 29, 2011 6:02:42 PM UTC-4, Anthony wrote: >> >>> Try this: >>> >>> form = crud.create(db[table]) >>> form.element('form').update(****dict(_class='no_trap', >>> action=URL('default','create_**fvte'))) >>> >>> >>> The _class='no_trap' should turn off the trapping of the form, and the >>> action=URL('default','create_**fvte') should ensure that the untrapped >>> form gets submitted back to the create_fvte function rather than the parent >>> page (i.e., the index function). Because the form will not be submitted via >>> ajax, the redirect should work as usual and reload the entire page. >>> >>> Anthony >>> >> >