What is the difference between the two of these? I always assumed it was just a different way of getting the same object.

Now I find myself, more often than not, having to use document.forms to get values from items such as a radio button or a text area.

Could someone explain to me why this happens?

E.g) On a project I am working on, I have a textarea I want to validate.

document.getElementById("reason").value returns 'undefined'
document.forms[0].reason.value returns the actual value


Any feedback is appreciated.