This got solved by using the fact that Field.default could be
manipulated *after* the Field has been created (following the above
line of examples):

def build_form(readonly=False):
    #create fields or get from
db
    field1=Field('test')
    field2=db.my_table.best
    #set
defaults
    field1.default='abc'
    field2.default='123'
    #give it to the
form
    form = SQLFORM.factory( *[field1, field2], readonly=readonly )

def frm():
    form = build_form( readonly=True )
    return dict(form=form)

So readonly=True and no need of form.accepts. The lesson (if I am
still not missing something) - if you want to reuse a SQLFORM.factory
form and make it readonly set the defaults using Field.default and not
Form.vars. Verrrrry particular...

Reply via email to