I am trying to set the number of rows containing form fields based on the value of an input box. How can I accomplish this? Code snippet below. Basically I want to loop the value in the "numpos" field. Ideally I'd like to have it dynamically update when the user types a number in the numpos field.
<tr>
<th>Number Of Positions:</th>
<td colspan="4"><cfinput type="text" name="numpos" required="yes" message="Please enter the number of positions"></td>
</tr>
<cfif #mynum# NEQ 0>
<cfloop from="1" to="#mynum#" index="i">
<tr>
<th>Number Of People Needed:</th>
<th>Position Description:</th>
<th>Date:</th>
<th>Start Time:</th>
<th>End Time:</th>
</tr>
<tr>
<td><cfinput type="text" name="numpeople"></td>
<td><cfinput type="text" name="posdesc"></td>
<td><cfinput type="text" name="posdate"></td>
<td><cfinput type="text" name="starttime"></td>
<td><cfinput type="text" name="endtime"></td>
</tr>
</cfloop>
</cfif>