On 20 abr, 15:39, mdipierro <[email protected]> wrote:
> please post a complete controller that exhibits the problem.
>
> Massimo
import applications.myapplication.modules.textchas as textchas
...
def my_controller():
form=SQLFORM(db.my_table)
if session.tch == None:
session.tch = textchas.get_tch()
tch = session.tch
form[0].insert(len(form[0])-1, TR('Validate:', tch[0], ''))
form[0].insert(len(form[0])-1, TR('', INPUT(_name='tcha', requires=
[IS_IN_SET(tch[1])]), ''))
if form.accepts(request.vars,session):
session.tch = None
response.flash='form accepted'
return dict(form=form)
This works well, does what I hope that it does, only that sends the
possible answers to the client.
As I said before, if from the browser I see the source code of the
page, there the answers are.
Get_tch () returns a tupla where the first element in a string
(question), and the second a list of strings (the answers).
Jose
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---