hi,
i have several questions about autocomplete widget
*code*
db.define_table('customer',
Field('first_name'),
Field('last_name'),
Field('address', 'text'),
Field('phone', 'list:string'),
format = lambda r: '%s %s' % (r.first_name, r.last_name) )
is it possible to have autocomplete widget that refer to multiple fields on
another table?
e.g. tested not work (no error occured but the result is not shown)
db.sale_order.customer.widget = SQLFORM.widgets.autocomplete(request,
db.customer.first_name | db,customer.address,
id_field =
db.customer.id,
limitby = (0,
10), min_length = 2)
is it possible to have autocomplete widget that refer to another table that
have field type as list:string or list:reference?
e.g. tested not work (no error occured but the result is not shown)
db.sale_order.customer.widget = SQLFORM.widgets.autocomplete(request,
db.customer.phone, id_field = db.customer.id,
limitby = (0,
10), min_length = 2)
how to make autocomplete smarter?
e.g.
db.sale_order.customer.widget = SQLFORM.widgets.autocomplete(request,
db,customer.address, id_field = db.customer.id,
limitby = (0,
10), min_length = 2)
i have customer A with address : Address 1
i have customer B with address : Address 2
then when i type the customer in sale order 'add' it shown address 1 and
address 2 (as expected),
but when i add another wrong letter 'adds', the list is still same (not
expected),
what i expected is when user type another wrong letter 'adds', the list of
['address 1', 'address 2'] is disapear.
any idea?
thanks and best regards,
stifan
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.