Multiple Insert Transactions with Relational Table
I am trying to combine three separate insert transactions onto a single page, which perhaps may not be possible. Any suggestions on how to approach this would be appreciated.
Essentially, there are two forms on the page:
First form is has the information for the "main" table, stores two fields right now - a type and a date.
The second form is a repeat region form, to allow for multiple entries to be inserted, then linked to the first forms entry via the relational table.
What I'm trying to have it do is when the page is submitted, insert the first form's data, then submit the multiple records to their table, and then add entries to the relational table with the IDs from the first two submission transactions.
Eventually, I'd also like to see what the possibility is to have the repeat region (for the multiple records position) be updated via AJAX, if that's doable. So if the user wishes to add another line/entry, they don't have to refresh the page and loose all their content they have made thus far.