Issues › Display dropdown div multiple times according to user input

asked on 20th Jul 2018

Hello everyone, I have a div which has 2 dropdowns. And also I have a div where user has to enter input.if user enters input as 1 then it should display only 1 time and if he enters 2 same div should append and display 2 times.if 3 then display 3 times.max num is 5.

<br>
   <div class='row '>
     <div class='col-md-3'>
       <label>No. of Requests</label>
     </div>
     <div class='col-md-5'>
        <input id='num_requests' name='num_requests' type='number' min=1 max=5 />
         <p style='color:gray;'><small>please select Number to decommission those many VM's.</small></p>
     </div>
   </div>

   <br>
   <div class='row' id ='vmselection'>
     <div class='col-md-3'>
         <select id='sites' name='sites'>
          <option>Select Datacenter</option>
          <option>US</option>
          <option>UK</option>
         </select>
     </div>
     <div class = 'col-md-3'>
         <select id='vcenters' name='vcenters'>
          <option>Select vcenter</option>
          <option>10.136.24.118</option>
          <option>10.146.24.128</option>
         </select>
     </div>
   </div>
    Add Answer
    All HTML codes will be stripped in the comment, except inline <code> HTML tag.

    Can You Answer this? Help us answer the question!

      • Answer
      Supports basic Markdown syntax. Excluded syntaxes (Headers, Lists, Blockquotes, Table, Images)