Your code works fine for me. Can you be more specific? What exactly does not 
work? Can you check in your browser to see if the Ajax call is getting made? 
Note, for the autocomplete widget to work, you need to include jQuery in 
your page (if you have web2py_ajax.html included in your layout, it will 
include jQuery for you).
 
Anthony

On Friday, August 12, 2011 11:25:16 AM UTC-4, uooyou wrote:

> Controller: index 
> def index(): 
>   form=SQLFORM(db.product) 
>   return dict(form=form) 
>
> view: 
> {{=form}} 
>
>
>
> On Aug 12, 10:57 pm, Anthony <[email protected]> wrote: 
> > Can you provide more detail? What does your controller/view code look 
> like? 
> > What exactly is happening? 
> > 
> > 
> > 
> > On Friday, August 12, 2011 10:49:00 AM UTC-4, uooyou wrote: 
> > > I am fresh man,  I copy the code from chaper 7 , 
> > 
> > > db.define_table('category',Field('name')) 
> > > db.define_table('product',Field('name'),Field('category')) 
> > > db.product.category.widget = SQLFORM.widgets.autocomplete( 
> > >      request, db.category.name, limitby=(0,10), min_length=2) 
> > 
> > > I have fill the table category some data, but it seem does not work. 
> > > Some additional work to do ?  thanks!

Reply via email to