If you want to display the possible answers:

 INPUT(_name='tcha', requires=IS_IN_SET(tch[1]))

If you do not want to display the possible anwers:

 INPUT(_name='tcha', requires=[IS_IN_SET(tch[1])])

In both cases the response is validated server side. If the use sends
back a tcha that is not in tch[1], the server will reject it and issue
a form error.

Massimo

On 20 Apr, 12:26, Jose <[email protected]> wrote:
> On 20 abr, 13:56, mdipierro <[email protected]> wrote:
>
> > web2py validation is ALWAYS done in the server.
>
> I refer to the following situation:
>
> I am trying to implement a system of confirmation based on questions.
>
> I use INPUT(_name='tcha', requires=IS_IN_SET(tch[1]))
>
> tch[1] is a list with possible answers
>
> The problem with this is the possible answers they travel to the
> client. Because of it I want to validate the response in the server.
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to