'Constructor
@param table: the database table
@param name: optional alternative form name
@param translate: enable/disable translation of strings'

def __init__(self, table, name=None, translate=True):

    self.table = table
    if name:
        self.name = name
    elif hasattr(table, '_tablename'):
        self.name = table._tablename
    else:
        self.name = str(table)
    fields = []
    append = fields.append
    for field in table:
        if field.readable:
            append(S3XFormsField(table, field, translate=translate))
    self._fields = fields
    self.translate = translate
