Ok Thank you Niphlod, just found in manual this:

If you want the field validated, but you do not want a drop-down, you must 
put the validator in a list.db.dog.owner.requires = [IS_IN_DB(db, 
'person.id', '%(name)s')]


hahaha sorry I was desperate to solve my problem..

Thanks!



On Sunday, February 22, 2015 at 1:03:56 AM UTC-3, Niphlod wrote:
>
> IS_IN_DB() is a validator. Usually you need it to turn a foreign key to a 
> human-understandable value, or to let the human select values from a set. 
> Depending on your model and on the number of values available, generating 
> the default widget in an edit form, which is an html SELECT, can take time, 
> but if you really want that widget, there's not much web2py can do, because 
> it needs to fetch those 10k records to let the human select the proper 
> value. 
> That being said, with 10k records, a SELECT is not appropriate, as you're 
> forcing your users to skip through 10k records to choose what they want. I 
> suggest you look into the autocomplete widget, or make your own ...
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to