I understand what you say but to me your form below shows (as it should be)
<div><table><tr><td><b><div>form</div></b></td><td align="top">:</ td><td><div><form action="" enctype="multipart/form-data" method="post">Question:<input name="name" /><input type="submit" / ><div class="hidden"><input name="_formkey" type="hidden" value="5817fd21-660c-4004-8d52-3f4b700af1f9" /><input name="_formname" type="hidden" value="default" /></div></form></div></td></tr></table></ div> It does not show the answers. I cannot reproduce your problem. Can you email me a minimalist app that exhibit the problem? If you modify a SQLFORM using append and insert it is possible that weird things happen. Massimo On 21 Apr, 08:47, Jose <[email protected]> wrote: > On 21 abr, 00:51, DenesL <[email protected]> wrote: > > > Jose, if I understand correctly you don't want to show the drop down > > with the options from the IS_IN_SET. > > You can do this by changing the input widget of the field: > > > db.my_table.my_field.widget=lambda self,value: > > INPUT(_type='text', _id='%s_%s' %(self._tablename,self.name), > > _class=self.type,_name=self.name,value='') > > > so now it will be displayed as a simple input in the form. > > The requires stays the same to validate the user's reply. > > > Denes. > > Probably it is a problem of since explaining it, my english is bad. > > Let's see this example (does not exist databases, tables, nor of > SQLFORM): > > def show_form(): > form = FORM('Question:', > INPUT(_name='name',requires=[IS_IN_SET > (['Answers1','Answers2','Answers2'])]), > INPUT(_type='submit')) > > if form.accepts(request.vars,session): > redirect(URL(r=request,f='index')) > > return dict(form=form) > > If I try it, it works well. Only accepts the values: Answers1, > Answers2 or Answers3. > With another value it shows: " value not allowed ". It this well. > > Massimo said that always the validation is realized in the server. But > Answers1, Answers2, etc. they travelled towards the browser of the > client (they are hidden). > > Doing this: > > import urllib2 > > f = urllib2.urlopen("http://127.0.0.1:8000/myapplication/default/ > show_form") > a = f.read() > ... > f.close() > > And knowing that the answers are somewhere, I can parsear (analyze) > the code and obtain the answers by means of a robot to fill the form. > (The idea is to implement something similar to captcha but with text.) > > I want to know is like to prevent the possible answers travel towards > the browser of the client. > > 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 -~----------~----~----~----~------~----~------~--~---

