I'm building a website that will allow a user to register many people at one time for something. The user selects the number of people they want to register, and then the next page populates that many forms.
I'm using PHP and CodeIgniter to do this.
For example, lets say there are 3 people being registered, and I am collecting the first name for each person. What I do is loop this 3 times:
<input type="text" name="firstName[]" value="" maxlength="50" class="text small" />
Notice the name of it.
Well, what I'm trying to do is implement a button that will allow the user to "Copy From Previous". The trouble I'm running into is that I need the name of the previous and current form in order to do it.
On the back when when I save the data, I can access it through index. Is there a way to do this with javascript?