Brand new to this, but I have managed to do create a button - when clicked, adds 1 row to table.
I want the script to duplicate the first 2 rows, placing them in rows 3 & 4. However, what happens is that using the code below, I only get 1 field added, and that is between my original dropdown and original text field.
The code I have used is:
----- form1.#subform[1].Button1::click: - (JavaScript, client) --------------------
Table1.Row1.instanceManager.addInstance(1);
I cannot figure out how to do do this. I have tried changing the code to "Row2", but nothing happens. I tried using the name of the text field, but again, nothing. I have read most of the post but none seem to address it.
Many thanks, in anticipation.
1. Create a table containing one row, and one cell in that row.
2. Drop a subform object onto the row 1 cell; this subform becomes a container for the two rows you want to duplicate.
3. Give the subform a fixed width (the width of your row), and fixed height (the height of two rows).
4. Drop two more subforms in the row 1 "container subform" and set their height/width as needed; they'll become row 1 and row 2 containers.
5. Drop objects (text fields, etc) into row 1 and 2 as needed.
6. Now when you do
Table1.Row1.instanceManager.addinstance(1)
it duplicates your container row (containing rows 1 and 2) to create a row (rows 3 and 4).
This is a solution I've used which has worked.