I have a form and there are three drop down menus (adults, children, infants) which has the values from 0 to 10. My javascript code adds new text fields to the form when the drop down menu changes.
For Example:
Selected option is 0. When the client changes adults drop down to 2, children drop down to 1 and infants drop down to 1, I want the code add
<input type="text" name="adult1" /><br>
<input type="text" name="adult2" /><br>
<input type="text" name="child1" /><br>
<input type="text" name="inf1" /><br>
to the HTML.

So the number of variables are different. We get the number of adults, children, infants from the drop down menu values and text field names goes like adult1,2,3,4

How can I get these values to separate variables? Can anyone send an example code?