Correct use of value not val in input field