Yes, of course. But in my mention, I have a different task to do. There is a dircet dependency between groupCards and answer. Answer can only exist, when groupCard exist before. There should be a way to test this and to generate a groupCard if it doesn't exist before. My problem is, that I want to do this just in one step. BTW: Am I right, that I can only display a dropdown-menu for a table for update/insert/delete-reasons and not just for selecting one row to work with the selected item in the next step?
On Wednesday, August 29, 2012 4:13:32 PM UTC+2, Richard wrote: > > Did you read this ? > http://web2py.com/books/default/chapter/29/7#One-form-for-multiple-tables > > Richard > > > On Wed, Aug 29, 2012 at 6:03 AM, jw <[email protected] > <javascript:>>wrote: > >> 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 >> >> -- >> >> >> >> > > --

