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.
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.
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.
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.
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.
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.
Don't use the lightning bolt. The value field itself should be a Select list with the repeated fields listed in it.
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
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.
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.
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.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.