Currently, I am working on creating a dropdown list that not only allows me to select items but also input free text. The code below enables me to choose an item from a selected range in Google Sheets. However, I am looking for a way to incorporate the functionality to input new text as well. I have tried using Datalist without much success. Any assistance or advice on how to achieve this would be highly appreciated.
<div class="row">
<script type="text/javascript"></script>
<script>
<?
var sheet = SpreadsheetApp.openById("ID").getSheetByName("Sheet");
var lastRow = sheet.getLastRow();
var myRange = sheet.getRange("A2:A"+lastRow);
var data = myRange.getValues();
?>
google.script.run.withSuccessHandler(populategetEmp1).getEmp1();
</script>
<div class="form col-md-6">
<label for="emp1">Client</label>
<select id = "emp1" class="form-control" >
<option value="" ></option>
<? for (var i = 0; i < data.length; ++i) { ?>
<option ><?!= data[i] ?></option>
<? } ?>
</select>
</div>