close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

multiple insert not working

Thread began 8/17/2015 11:45 am by Jason | Last modified 8/24/2015 10:23 am by Ray Borduin | 2174 views | 15 replies |

Jason

multiple insert not working

I'm not sure what's going on, but the multiple insert doesn't seem to be working at all. Also, the repeat region around the status select option only works for the first row.

Attached Files
submit_attendance - Copy.php
Sign in to reply to this post

Ray BorduinWebAssist

It looks like you used "Repeat Selection" around the select list options. Remove that and use the "Dynamic" button from the select list properties inspector to apply the correct code for repeating options in a select list and it should start working properly.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jason

That fixed the status select list issue, but the multiple record insert is still not working. The single MySQLi record inserts, but none of the multiple insert rows are inserting.

Sign in to reply to this post

Ray BorduinWebAssist

You have named your fields with brackets... you shouldn't do that with the multiple insert server behaviors. It appends a unique id to the end of each name instead of passing the values as an array.

Remove the brackets from each of the form element names.

name="person_[]_<?php echo $RepeatSelectionCounter_1; ?>"

should be:
name="person_<?php echo $RepeatSelectionCounter_1; ?>"

Then open the server behavior and re-bind all of the field values making sure to choose the associated values from the select list repeated form values.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jason

I think something went a little screwy along the way Ray. I changed the names like you said (I think), and when I went to rebind the values in the insert behavior, none of my form elements showed up (assuming I'm looking in the correct place). I attached a screenshot of what I saw, and an updated copy of the page.

Attached Files
submit_attendance - Copy.php
Sign in to reply to this post

Ray BorduinWebAssist

Don't use the lightning bolt. The value field itself should be a Select list with the repeated fields listed in it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jason

https://www.youtube.com/watch?v=218iXiKhKlg Thanks Ray!

I moved the custom code I have that clones a row and allows you to search for a person, to another form on the same page. Would a separate insert multiple work for that code using the lightning bolt, since is doesn't have a repeat region around it? I made an attempt at doing this, but it didn't work. Not sure if it just won't do it, or I made another mistake somewhere along the way

Attached Files
submit_attendance.php
Sign in to reply to this post

Ray BorduinWebAssist

I think we should do a premier support ticket for this one. You are doing some pretty complex stuff and I'm sure I can help you get it done in a one hour session, but it might take some custom coding. We could probably even get it done with MySQLi in a premier ticket, so I think that is the way to go.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jason

I understand, and I really wish I could, but I'm doing this for free at my church and I already spent what I had available on the software and new hardware. I'll just have to figure out another way to make this work. Possibly send them to a different page or something a little less user friendly, but functional and within my capabilities. Thanks for getting me through the original issue though! I'll see you on the next one.

Sign in to reply to this post

Ray BorduinWebAssist

I think you could probably use the MySQLi insert server behavior and bind the values to the post fields as array values and manually code a for loop around it to loop through all of the values.

It is just a little too complex for me to do in a forum post. I'll give you 50% off a premier ticket to get it done since I want to help.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

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...