close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Insert Transactions with Relational Table

Thread began 7/16/2014 1:25 pm by Eric | Last modified 7/17/2014 6:19 am by Jason Byrnes | 1112 views | 3 replies |

Eric

Multiple Insert Transactions with Relational Table

Hi there,
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.

Thanks much!

Eric

Sign in to reply to this post

Jason ByrnesWebAssist

instead of using 2 forms, use 1 form with the fields for the main table, then the fields in the repeat region.

as for the inclusion of ajax, you would need to hand code that, we could help you implement this in a premiere support appointment:
http://www.webassist.com/premier_request.php

Sign in to reply to this post

Eric

Thanks for your reply. I adjusted the page to have one form with everything within it, and went ahead and tried that with no luck - it inserted the first of the repeated form set only, and nothing was inserted into the relational table. Also, neither of the form fields from the main form are posting data to the database either. An empty record is inserted.

Updated copy of the page attached.

Sign in to reply to this post

Jason ByrnesWebAssist

you have duplicate form element names.

for the initial insert, you have an element named "name" date, and for the repeating form, you also use an element named "name", you need to use unique form element names.

on an insert, you wont use the manage relational table behavior, you only need the multiple insert behavior. so you should have the initial insert, then 2 multiple inserts.

before adding the multiple inserts, add a repeat region around the first group of repeating form elements and another repeat region around the second group of repeating form elements.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...