Create or delete a div on click in my form

Hi,
best approach is to create an Array variable which will hold your data, one item in the array will be one line of your form.
You can create a container, and bind the repeat items to this variable.
Then just make your template for each line. On each input on each line, bind the initial value to the data in the corresponding context.item, and add an onChange workflow which will update the array at the context.item.index position.
On the Add button, push in your variable array a new item with some initial values.
On the delete button, delete the context.item.index element on your array.

On your final workflow, you will be able to use the array variable

If some of these steps are not clear let me know, and i will go on a more detailed version
You have a more detail explanation here

1 Like