Thanks it worked but whenever I open the Wizard, the code changes from
<input name="addRecords" type="submit" id="addRecords" value="Submit">
to
<input name="addRecords_<?php echo $RepeatSelectionCounter_1; ?>" type="submit" id="addRecords_<?php echo $RepeatSelectionCounter_1; ?>" value="Submit">