Hello
I have following cut of code:
db.define_table('papers',
    Field('printdate','date'),
    Field('printout','boolean',default=False),
    Field('globnum','integer'),
    Field('locnum','integer'),
 
Field('oncheck','string',default='on',readable=False,writable=False))
conntroller
    posts = db(db.papers.printout ==
False).select(limitby=(0,16),orderby=db.papers.id)
    for pst in posts:
 
chkposts.append(TD(INPUT(_type='checkbox',_name='pst_'+str(pst.id),
            requires=IS_NULL_OR(IS_IN_DB(db(db.papers.id ==
pst.id ),'papers.oncheck','',error_message=T('CLOSED FOR
ACCEPT!'))),value=paperprint),str(pst.printdate.strftime("%d/%m/
%y"))))

So, if db.papers.printout gets False this entry disappeared from FORM,
so validator IS_IN_DB even does not get used and checkbox value
accepted.
Is there the way to save 'posts' for the first time FORM loaded. And
then only saved result use for 'for pst in posts:'
Thank you.

Reply via email to