How to repeat the form data according to integer value get from the select box.?
<p>How can form elements be repeated as many times as chosen by (the value of a) select box?
        I tried to get the value from the select box and based on that integer value, the form should be repeated. For example in select box, selecting <em>2</em> means the form should display 2 times.
     My html code is:</p>

<pre><code>&lt;select id="sel" class="sel"&gt;
&lt;?php
$v=1; 
while($v&lt;=10){
    ?&gt;      
&lt;option value="$v"&gt; &lt;?php echo $v; ?&gt;&lt;/option&gt;
&lt;?php $v++; } ?&gt;&lt;/select&gt;
&lt;button class="add_field_button"&gt;Add More Fields&lt;/button&gt;
&lt;div&gt;name:&lt;input type="text" name="mytext[]"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id="inrlog" style="display:none;"&gt;
   &lt;div&gt;name:&lt;input type="text" name="selname"&gt;&lt;/div&gt;
 &lt;/div&gt;
</code></pre>

<p>and my Javascript is:</p>

<pre><code> $(document).ready(function() {
var e = document.getElementById("sel");




$("#sel").select(function(){

   $("#sel").click(function(){
    $("#inrlog").show("slow");
});

});
</code></pre>