I'm trying to get two selected form.vars as args, but fail on it.
There is a list of text's names, have to return two selected text.

In controller:

def index():
    options = [OPTION(texts.title, _value=texts.id) for texts in 
test().select(test.slovar.ALL)]  
    form=FORM(TABLE(TR("Select first text",SELECT(*options, name="first")),
                    TR("Select second text",SELECT(*options, 
name="second")),
                    TR("",INPUT(_type="submit",_value="SUBMIT"))))
    if form.process().accepted:
        redirect(URL('test_index1', args = [form.vars['first'], 
form.vars['second']]))
        response.flash="form accepted"
    return dict(form=form)

def test_index1():
    text1=test(test.slovar.id==request.args(0)).select()
    text2=test(test.slovar.id==request.args(1)).select()

But index() return None and None. What I am doing wrong?

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to