I have created a form in which 1 drop down is there which stores the value of another drop down.but the issue is the drop down stores the duplicate values.What should I do so that the drop down wont display any redundant data.
The code is as folows :
<form class="form-inline" role="form" method="post" action="/assignloc">
<div class="form-group" style="margin-top:4%;">
<label for="exampleInputEmail1" class="h2color" >FE Name</label>
<select name="selectpicker" class="form-control">
<% for(var i=0;i<pic.length;i++){ %>
<option value=<%=pic[i].name%>>
<%=pic[i].name%> </option>
<% } %>
</select>
<label for="exampleInputEmail1" class="h2color" style="margin-left:10px;">Broker ID</label>
<input type="text" class="form-control" placeholder="Broker Id" name="brokerid">
<button type="submit" class="btn btn-primary btn-lg active">Assign</button>
</div>
</form>