So you shoudl do
def update_form():
if not (club and address and nfas and persoon):
session.flash = "You have been redirected because you did not
supply all of the correct data"
redirect(URL(r=request, a='init', c='clublocator', f='application_form'))
return dict(form=form)
Then there is nothing else you need to do, when they see the next
page, web2py will replace response.flash with what is in
session.flash, and they will see the message.
--
Thadeus
On Wed, Apr 28, 2010 at 1:31 PM, annet wrote:
> Thadeus and Jonathan,
>
> Thanks for you replies. I am afraid I haven's made myself clear.
> However, your replies pointed me in the right direction.
>
> I have an update_form, in which I set the values by querying the
> database, which results in four rowsets. When one of the rowsets is
> empty, the function breaks. I thought I'd solve this problem by adding
> an if which checks if all the rowsets evaluate to true:
>
>
> def update_form():
>
> if not (club and address and nfas and persoon):
>
> redirect(URL(r=request,a='init',c='clublocator',f='application_form'))
>
> return(form=form)
>
>
> Then in the init/clublocator/application_form function I would check
> if the request comes from the crm/clublocatormail/update_form
> function:
>
> if
> request==URL(r=request,a='crm',c='clublocatormail',f='update_form'):
> response.flash='message'
>
>
> After reading your replies I learnt that maybe just: if request.args
> solves my problem.
>
>
> I supports Thadeus comment on response.flash, it's quite a challenge
> to get all your response.flash assignments right, and not overwrite
> them elsewhere.
>
>
> Kind regards,
>
> Annet.
>