I have a quite similar question to this unrepleyd post: https://groups.google.com/forum/?fromgroups=#!searchin/web2py/form$20simultaneously$20insert/web2py/w44ZEk0ODsk/aCy4XmPmQmQJ
I try to realize one form within two tables get an insert by accepting the
form.
db.card.subject_id.default = subject_id
db.groupCards.studyGroup_id.default = auth.user.studyGroup_id
db.answers.user_id.default = auth.user.id
db.answers.datetime.writable = False
factory=SQLFORM.factory(db.card,db.groupCards,db.answers)
As you can see in both pictures and the code above, I've some
default-values when setting up the form.
I would like to select the question (Frage), depending from the default
subject. Now, I get all the questions in the table.
After that, the user writes his answer and the answer should be inserted in
the answer table and in the same time with the link to the new inserted
groupCard.
Is this possible with web2py or do I have first insert a new groupCard and
insert a answer after this in a second form?
Sorry for my English.
Thanks in advance,
Jens
--
<<attachment: database.PNG>>
<<attachment: form.PNG>>

