if isinstance(table, list):
# using _table to check if Field.bind was called
# and the field is bound to a table, since unlike `tablename`, `_table` is
# only set in Field.bind()
all_tablenames = list(
set(
str(getattr(field, "_table", None) or "no_table") for field in table
)
)
# only disable dbio if the fields are from multiple tables
# this allows making forms for a subset of fields easily:
# Form([db.tbl.field1, db.tbl.field2])
if not all_tablenames or len(all_tablenames) > 1 or all_tablenames[0] in "no_table":