document.getElementByName returned undefined for all inputs in a form : I am trying to do some calculations with some form inputs but all the element (checkbox,text etc) returned[enter image description here][1] undefined when I try to get their value using document.getElementById('income').value. 


  [1]: https://i.stack.imgur.com/S904M.png