Denes,

I adjusted the form: type='integer' and _type='integer'

form=form_factory(SQLField('postcoderegio',type='integer',
requires=IS_NOT_EMPTY(),\
    widget=lambda self,value:TAG[''](INPUT
(_id='byzipcode',_name='postcoderegio',_class=\
'ac_input',_type='integer'))))


and the handler in /core/handlers/: db.zipcoderegions.region.like('%d%
%'%q) and r='%d%d\n'%(r,row.region)


def byzipcodeAC():
    q=''
    if request.vars:
        q=request.vars.q
    if not q:
        return q
    rows=db(db.zipcoderegions.region.like('%d%%'%q)).select
(db.zipcoderegions.region)
    r=''
    for row in rows:
        r='%d%d\n'%(r,row.region)
    return r


But the auto-complete still isn't working, i.e. when I type a number
e.g. 7 the auto-complete results (71, 73, 74 etc) don't show up.

Is it the 'n' in r='%d%d\n'%(r,row.region) or something else?


Kind regards,

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