You need to use SQLFORM.factory and then you can use custom forms in
view by bracketing the form content with
{{=form1.custom.begin}}
custom form content
{{=form1.custom.end}}.
Be sure to have a hidden input with the form name and that the form
name is referenced in the controller's accept method
if form1.accepts(request.vars,formname="form1"):
response.flash='form accepted'
You can reference multiple tables in SQLFORM.factory
(db.table1,db.table2,...) but the fields in the tables must have
unique names, i.e. this won't work if db.table1 has field "name" and
db.table2 has field "name".
You may have to turn off fields that aren't being used but that have
requires validators. Do this in the controller by
db.table1.field1.readable=db.table1.field1.writable=False
You also will have to manually insert into the db in the accepts
clause with a statement like this:
db.table1.insert(field1=form1.vars.field1)
Hope this helps.