hi all.
page is here: https://xmarx.pythonanywhere.com/deneme/default/test1
i have a page has form that manually created. if submits page redirect new
page that has a SQLFORM. i cannot have a result form second page.
def test1():
questions=[1,2,3,4,5,6,7,8,9,10]
return locals()
{{extend 'layout.html'}}
<h1>Select Questions </h1>
<form enctype="multipart/form-data" action="{{=URL('test2')}}" method="post
">
{{for question in questions:}}
<div><input type="checkbox" name="q" value="{{=question}}"/>
{{=question}}</div><br />
{{pass}}
<input type="submit" /> </form>
def test2():
if request.vars and request.vars.q:
selected_questions=request.vars.q
form=SQLFORM(db.test)
if form.process().accepted:
session.flash='Test added!'
redirect(URL('test3'))
else:
response.flash='form has an error.'
return locals()
test1.html display form. if i submit it redirects with post_vars to
test2.html. but test2.html says "form has an error" when loading page. i
mean i didn't fill second (SQLFORM) form and i didn't submit it.
if i fill second form and submit it, it didn't test3.html. nothing happend
actually.
thanks.
--
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.