In db.py I have the following table: db.define_table('function', Field('company_id',db.company,default='',notnull=True,writable=False,readable=False), Field('home',type='boolean',default=True,writable=False), Field('logo',type='boolean',default=False), Field('tagline',type='boolean',default=False), Field('image',type='boolean',default=False), Field('text',type='boolean',default=False), Field('css',type='boolean',default=False), Field('customcss',type='boolean',default=False), Field('keywords',type='boolean',default=False), Field('counter',type='integer',default=1), migrate=False)
In a cms the administrator makes functions available to users by (un)checking them. Now the counter should keep track of the number of checked functions. The cms function: def functions(): .... db.function.company_id.default=id form=crud.update(table=db.function,record=row,next=URL\ (r=request,f='home',args='updated'),message=message) return dict(form=form) Is there a validator available to update the counter or is this best solved in JavaScript. If so, I hope one of you can provide me with an example, because I don't know much about JavaScript. Kind regards, Annet.