On Apr 18, 7:40 pm, Jose <jjac...@gmail.com> wrote:
> Three Questions:
>
> 1) Does DAL implement IN and NOT IN?
> I have not seen it.

yes

query=db.table.field.belongs(('a','b','c'))
query=~db.table.field.belongs(('a','b','c'))
query=db.table.field.belonds(db(query)._select
(db.othertable.otherfield))

 > 2) After filling a dropbox with:
> db.dog.owner.requires = IS_IN_DB(db,db.person.id,'%(name)s')
> Is it possible to choose a value predetermined like initially?

You must define your own widget for this.

> 3) To a form created with SQLFORM I want to add a new field, not
> belonging to the table. It is a necessary field to validate, similar
> to use captchas, but with text.
> Is it possible to do what I need?

if form is your form...
form[0] is the <table>...</table>
so you can do

form[0].append(TR('label',INPUT
(_name='youvarname',requires=IS_NOT_EMPTY()),''))

To insert the field in the form. Or you just use a custom field.

Massimo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to