How to create dropdown list options from the name field inputs?