I've written a very basic function for practice, but I can't get it to work with form elements. I'm always getting "undefined" instead of values.

Could anyone please help?

Here's my file on...