Add/Remove Input Fields Dynamically with...
  • Display dropdown div multiple times according to user input

  • Asked by Usersc 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.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
<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

      Can You Answer this? Help us answer the question!

        • Answer
        Supports basic Markdown syntax.