Hello every one this my dynamic form in this I am using select2 search option in this form and it is not working
this Head
<script src="jquery-3.3.1.min.js" type="text/javascript"></script>
<!-- Select2 JS -->
<script src="select2/dist/js/select2.min.js" type="text/javascript"></script>
And this is my dynamic html Form i was not able to write full code due to stack overflow restrictions
html += `<td><select type="text" name="head[]" class="form-control inst_amount"><option value="">Select Name</option><?php $sql=mysqli_query($con,"SELECT * FROM bank_details order by name");
while($row=mysqli_fetch_array($sql))
{?><option value="<?php echo htmlentities($row['id']);?>"><?php echo htmlentities($row['Name']);?></option><?php }?></select></td>`;
This is select2 library
<!-- Select2 JS -->
<script src="select2/dist/js/select2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.inst_amount').select2();
});
</script>