Hi,
In my PDf I need to add and remove subform instances dinamically.
I only have/need one subform. This subform has a multi line text field and 2 buttons: add and delete instance. So everytime I create a new instance, I will get a text filed with 2 buttons.
My first requesite was to be able to delete any of the previous created instances. I figured out this using: this.parent.index in the deleted instance.
However, in what regards to creating new instances, I would like also to create each instance, not after all the other previuos created instances, but right after the instance where the button was clicked.
Example:
Initial case:
instance 1
instance 2
instance 3
I need to be able to create a new instance, for example, between instance 1 and instance 3.
instance 1
instance 2 (new)
instance 3
instance 4
Is this possible?
Thank you!