looks like the submit button was initially inside the repeat. change the submit button code:
<input name="addRecords_<?php echo $RepeatSelectionCounter_1; ?>" type="submit" id="addRecords_<?php echo $RepeatSelectionCounter_1; ?>" value="Submit">
to:
<input name="addRecords" type="submit" id="addRecords" value="Submit">