This will help if the input field has an identifier:
<input type="text" id="someinput" value="" />
Then you need an event listener in the selection box.
<select id="someselect">...</select>
In javascript:
document.getElementById('someselect').onchanged = function() {
var selem = document.getElementById('someselect');
document.getElementById('someinput').value = selem.options[selem.selectedIndex].value;
}
This is a very rough idea.
source
share