I have tried everything that I can think of to get the Remove Instance button to work to remove the CURRENT instance but I can't figure it out.
Basically I have a table with a section. Within this section I have one row that the user can add more instances of. I added a remove instance button but it acts erratically and I can't get it to remove the CURRENT instance. Sometimes it deletes the first instance..sometimes the last instance in the repeating section...it's all over the place and I can't figure out why.
I found a workaround. My problem occurred when I added another instance of the table section. The code for add/remove instances would work on the first section but not on subsequent instances.
I decided to split the table..convert my header row to a standalone textfield and the repeatable row into a one row table. Then I wrapped the table and textfield in a subform to create my table 'section.' All codes for removing/adding instances work as they should now.
Thanks so much, but it's not working still. That's the problem that I am having..the code is ok and it works for the first instance of the table section. But if I add more instances of the table sections the buttons don't work at all. I suspect it has something to do with the form construction or another setting and not so much with the script