I found this script to do it <script>
function myFunction() {
var mylist = document.getElementById("myList");
document.getElementById("demo").value = mylist.options[mylist.selectedIndex].text;
}
</script>
from w3schools, but in the id's, I don't know if I have to put the name of the fields, of the number of id of the fields