Just try an experiment like this...

if form.process().accepted:
    myvars = {'myvar1': 'A', 'myvar2': 'B'} 
    redirect(URL('default', 'nextstep', vars=myvars ))

def nextstep():   
    print request.vars.myvar1,  request.vars.myvar2
    return myvars


On Thursday, 31 March 2016 21:32:31 UTC+1, aetag...@gmail.com wrote:
>
> I fill an empty array with form values in a single view, 
> how am I able to pass this array into a new view so that I can do what I 
> want with the values in the new controller after the form is submitted? 
>
>
> I try doing something like the following within my controller containing 
> the form:
>
> if form.process().accepted:
> redirect(URL('default', 'nextstep', 'vals=vals')
>
> where vals is the array that I filled from that view, this gives me a 
> ticket saying global variable vals is not defined when I try using it in 
> the nextstep controller...so I am not passing it correctly.
>
> def nextstep():
> return dict(vals=vals)
>
> P.S. This array is filled a specific way after the values are acquired 
> from form.vars so this is why I need to figure out how to pass the new 
> array *vals* into a new controller..
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to