song2siren
Programmer
Hello
I've created an online booking form for people to book places on various conferences. On the form is the following table, nested within a row of a larger table:
<tr>
<td colspan="2"><table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="Heading1">Delegate 1</td>
<td valign="top"> </td>
</tr>
<tr>
<td height="10" valign="top"></td>
<td height="10" valign="top"></td>
</tr>
<tr>
<td width="45%" valign="top" class="head">Title:</td>
<td width="55%" valign="top" class="confEntry"><select name="Title1" class="Text">
<option>Mr</option>
<option>Mrs</option>
<option>Miss</option>
<option>Ms</option>
<option>Sir</option>
<option>Dr</option>
</select>
</tr>
<tr>
<td height="2"></td>
<td height="2"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">First Name:</td>
<td height="25" valign="top" class="confEntry"><input name="FirstName1" type="text" class="Text" size="20">
</td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Surname:</td>
<td height="25" valign="top" class="confEntry"><input name="Surname1" type="text" class="Text" size="20"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Position:</td>
<td height="25" valign="top" class="confEntry"><input name="Position1" type="text" class="Text" size="20"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Profession:</td>
<td height="25" valign="top" class="confEntry"><input name="Profession1" type="text" class="Text" size="20"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Email:</td>
<td height="25" valign="top" class="confEntry"><input name="EmailDel1" type="text" class="Text"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Direct Tel:</td>
<td height="25" valign="top" class="confEntry"><input name="TelDel1" type="text" class="Text"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Attendance Under:</td>
<td height="25" valign="top" class="confEntry"><select name="Attendance1" class="Text">
<option selected>None</option>
<option>Law Society CPD Scheme</option>
<option>ILEX CPD Scheme</option>
<option>Bar Council Practitioner Programme</option>
</select></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Dietary Requirements:</td>
<td height="25" valign="top" class="confEntry"><input name="Diet1" type="text" class="Text"></td>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
</table>
</td>
</tr>
However, I need to add a button which the user can click to add an infinite number of extra delegates.
When the button is clicked, the replica table must appear in a row below the one in which the above table appears. All of the input names for the form objects such as FirstName1 must then be automatically named FirstName2 etc, and the table must have the heading Delegate 2.
This looks a bit tricky to me, so any ideas/help would be very much appreciated!
I've created an online booking form for people to book places on various conferences. On the form is the following table, nested within a row of a larger table:
<tr>
<td colspan="2"><table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="Heading1">Delegate 1</td>
<td valign="top"> </td>
</tr>
<tr>
<td height="10" valign="top"></td>
<td height="10" valign="top"></td>
</tr>
<tr>
<td width="45%" valign="top" class="head">Title:</td>
<td width="55%" valign="top" class="confEntry"><select name="Title1" class="Text">
<option>Mr</option>
<option>Mrs</option>
<option>Miss</option>
<option>Ms</option>
<option>Sir</option>
<option>Dr</option>
</select>
</tr>
<tr>
<td height="2"></td>
<td height="2"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">First Name:</td>
<td height="25" valign="top" class="confEntry"><input name="FirstName1" type="text" class="Text" size="20">
</td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Surname:</td>
<td height="25" valign="top" class="confEntry"><input name="Surname1" type="text" class="Text" size="20"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Position:</td>
<td height="25" valign="top" class="confEntry"><input name="Position1" type="text" class="Text" size="20"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Profession:</td>
<td height="25" valign="top" class="confEntry"><input name="Profession1" type="text" class="Text" size="20"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Email:</td>
<td height="25" valign="top" class="confEntry"><input name="EmailDel1" type="text" class="Text"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Direct Tel:</td>
<td height="25" valign="top" class="confEntry"><input name="TelDel1" type="text" class="Text"></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Attendance Under:</td>
<td height="25" valign="top" class="confEntry"><select name="Attendance1" class="Text">
<option selected>None</option>
<option>Law Society CPD Scheme</option>
<option>ILEX CPD Scheme</option>
<option>Bar Council Practitioner Programme</option>
</select></td>
</tr>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
<tr>
<td height="25" valign="top" class="head">Dietary Requirements:</td>
<td height="25" valign="top" class="confEntry"><input name="Diet1" type="text" class="Text"></td>
<tr>
<td height="2" valign="top"></td>
<td height="2" valign="top"></td>
</tr>
</table>
</td>
</tr>
However, I need to add a button which the user can click to add an infinite number of extra delegates.
When the button is clicked, the replica table must appear in a row below the one in which the above table appears. All of the input names for the form objects such as FirstName1 must then be automatically named FirstName2 etc, and the table must have the heading Delegate 2.
This looks a bit tricky to me, so any ideas/help would be very much appreciated!