accepting the selecting id on the input/select element

The code now correctly find the input element.
Now the code complains because the messages array is missing from the API response.