I have not tried to implement this yet, so I donβt know that he is 100% right, but you can put a hidden (read display: 'none';) input field on top of the selected one.
HTML
<select id="country"> <option value="INP">Input Value</option> <option value="USA">USA</option> <option value="MEX">Mexico</option> <option value="CAN">Canada</option> </select><br/> <input type="text" id="countryInput"/>
CSS
#countryInput{ display:'none';position:relative;top:-15px;}
Use jQuery to display an input field when you select a specific value from the drop-down list (and hide all other values).
$(function(){ $('#country').on('change',function(){ if(this.val()==="INP"){ $('#countryInput').prop('display',''); } else { $('#countryInput').prop('display','none'); } }); });
Then write a function to add the result to the drop-down list if you want.
source share