I feel like there is an obvious way to do what I'm doing - so figured it was best to ask the experts.
I've broken this problem down to where buttons show the variable names.

the length of the gallery is specified by varTestSequence - when +1 or -1 is pressed (you guessed it), a row gets added or deleted. My problem arises when I have data already inside the gallery.

here's text in the gallery, then I press -1

is there a way to have it so that the textboxes/rows that have data inside remain? I think it'd get frustrating for my users when they had a last minute addition and have to type everything out again 😅