Denes,

Thanks for your reply, it was very helpful.


As to your question, the answer is in my comment to this post:

http://groups.google.com/group/web2py/browse_thread/thread/f24fa2b73cc927f2/e2fad1db1810b75e#e2fad1db1810b75e


I hope you will help me solve the following problem as well. The drop
boxes for training and facility do not contain more than 20 to 30
items, so using drop boxes is OK. However, when it comes to searching
by place, the drop box would contain more than 400 items, therefore, I
would like to use an auto-complete field instead of a drop box. I had
a look at the auto-completion examples in the web2py manual (page
196-198), but they are based on FORM, whereas I use form_factory to
build forms.

The idea is much the same as the one in my post above. I have got a
table address (adres), which contains a column 'city' (plaatsnaam).
The auto-complete list should be based on this column.

At the moment my controller reads like:

def byplace():
    form=form_factory(SQLField('plaatsnaam',label='Type een
plaatsnaam',requires=IS_NOT_EMPTY()))
    if form.accepts(request.vars,session):
        response.message='Geen match op plaatsnaam'
        clubs=db((db.bedrijf.id==db.adres.bedrijf)&
(db.adres.plaatsnaam==request.vars.plaatsnaam)
        .select
(db.bedrijf.id,db.bedrijf.bedrijfsnaam,db.bedrijf.ranking,db.adres.straatnaam,
\
        orderby=db.bedrijf.ranking|db.bedrijf.bedrijfsnaam)
    else:
        response.message='Formuleer een zoekopdracht'
        clubs=[]
    return dict(form=form,clubs=clubs)


I do not know much about JavaScript and AJAX, so your help is much
appreciated.


Annet.




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to