{{extend 'layout.html'}}

{{=survey.title}}

{{k=0}} {{for i,q in enumerate(questions): if q.id==question.id: k=i pass}} {{if k>0:}} {{=A(IMG(_src=URL(r=request,c='static',f='surveys/previous.png'),_align="left"),_href=URL(r=request,args=[survey.id,questions[k-1].id]))}} {{pass}} {{if k
    {{for i,q in enumerate(questions):}} {{=LI(A('%i) %s'%(i+1,q.title),_href=URL(r=request,args=[survey.id,q.id])),_class='myQuestionOn' if q.id==question.id else 'myQuestion')}} {{pass}}

{{=k+1}}) {{=question.title}}

{{=XML(question.body)}}

(ATTENTION: For each answer you need to press the submit button below) {{=form}}