This should be solvable. However, I would recommend using a "regular" form instad of javascript, in case the people who are going to use it does not have JS capabilities. (Or run Opera/Netscape, in wich case the below might not work.)
This is just an example. There are several solutions for this.
<!-- Begin -->
<form action="file.php" method="post" name="mainForm">
<!-- "base inputs", always present -->
<input type="text" name="test[]">
<input type="text" name="test[]">
<!-- Button that removes 'none' from div Part1s style.display -->
<input type="button" value="more" onClick="Part1.style.display='';">
<!-- Start of Part1 div -->
<div id="Part1" style="display:none">
<!-- (insert more inputs) -->
<!-- Button that removes 'none' from div Part2s style.display -->
<input type="button" value="more" onClick="Part2.style.display='';">
</div>
<!-- same as above -->
<div id="Part2" style="display:none">
<!-- last set of inputs -->
<input type="submit" value="finish">
</div>
</form>
<!-- The end -->